> * @license AngularJS v1.3.13 > * (c) 2010-2014 Google, Inc. http://angularjs.org > * License: MIT > >>
>* State-based routing for AngularJS > * @version v0.2.8 > * @link http://angular-ui.github.com/ > * @license MIT License, http://www.opensource.org/licenses/MIT>
> app.config(['$stateProvider', function ($stateProvider) { > $stateProvider.state('home', { > url: '/', > controller: 'max4salesController', > template: '' > }).state('edit', { > url: '/edit/:id', > controller: 'max4salesCrudController', > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('new', { > url: '/new', > controller: 'max4salesCrudController', > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('department', { > url: '/newDepartment/:departmentId', > controller: 'max4salesCrudController', > cache: false, > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('category', { > url: '/newCategory/:categoryId', > controller: 'max4salesCrudController', > cache: false, > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('item', { > url: '/newItem/:itemId', > controller: 'max4salesCrudController', > cache: false, > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('subCategory', { > url: '/newSubCategory/:subCategoryId', > controller: 'max4salesCrudController', > cache: false, > templateUrl: 'CapacityControl/max4sales/editForm' > }).state('deleteRanges', > { > url: '/deleteRanges', > controller: 'max4salesCrudController', > cache: false, > templateUrl: 'CapacityControl/max4sales/deleteRanges' > }); > }]); >>
>if ($scope.searchParameters.categoryId != 0) { > window.console && console.log('Going to category state...') > $state.go('category', { categoryId: $scope.searchParameters.categoryId, createDaily: createDaily },{ reload: true }); > }>