diff --git a/client/client/src/filterClientList.js b/client/client/src/filterClientList.js index 908754b0f..3ad70cfc5 100644 --- a/client/client/src/filterClientList.js +++ b/client/client/src/filterClientList.js @@ -2,6 +2,7 @@ export default class FilterClientList { constructor($scope, $timeout, $state) { this.$ = $scope; this.$timeout = $timeout; + this.$state = $state; this.waitingMgCrud = 0; this.clientFk = $state.params.id; diff --git a/client/core/src/watcher/watcher.js b/client/core/src/watcher/watcher.js index 2dbc5a2bc..d259f6f39 100644 --- a/client/core/src/watcher/watcher.js +++ b/client/core/src/watcher/watcher.js @@ -68,9 +68,9 @@ export default class Watcher extends Component { * * @param {String} state The state name */ - submitGo(state) { + submitGo(state, params) { return this.submit().then( - () => this.$state.go(state) + () => this.$state.go(state, params || {}) ); } /** diff --git a/client/salix/src/configroutes.js b/client/salix/src/configroutes.js index 1d79c5bc2..e5ab72fb8 100644 --- a/client/salix/src/configroutes.js +++ b/client/salix/src/configroutes.js @@ -47,9 +47,8 @@ function config($stateProvider, $urlRouterProvider, aclServiceProvider, modulesF for (let i = 0; i < count; i++) { let route = fileRoutes[i]; if (aclService.routeHasPermission(route)) { - $stateProvider.state(route.state, { + let configRoute = { url: route.url, - abstract: route.abstract || false, template: `<${route.component} ${getParams(route)}>`, resolve: { loader: loader(moduleName, validations) @@ -57,7 +56,13 @@ function config($stateProvider, $urlRouterProvider, aclServiceProvider, modulesF data: { routes: fileRoutes } - }); + }; + if (route.abstract) + configRoute.abstract = true; + if (route.routeParams) + configRoute.params = route.routeParams; + + $stateProvider.state(route.state, configRoute); } else if (route.state === mainModule.state) { break; }