* @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/MITI believe I have the same problem as described in this very long thread
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' }); }]);and the buttons essentially call the following:
if ($scope.searchParameters.categoryId != 0) { window.console && console.log('Going to category state...') $state.go('category', { categoryId: $scope.searchParameters.categoryId, createDaily: createDaily },{ reload: true }); }and so I expect that my 'max4salesCrudController' Init method is going to fire, but this is not happening when I add a new row, press save, then click on the Create Daily. If I click on Create Daily again after cancelling, it does go now to the Init of my controller and calling APIController method.