}).state('new', { > url: '/new', > controller: 'max4salesCrudController', > templateUrl: '/CapacityControl/max4sales/editForm' > }).state('department', { > url: '/new/:departmentId', > controller: 'max4salesCrudController', > templateUrl: '/CapacityControl/max4sales/editForm' > }).state('category', { > url: '/new/:categoryId', > controller: 'max4salesCrudController', templateUrl: '/CapacityControl/max4sales/editForm' }).state('item', { url: '/new/:itemId', controller: 'max4salesCrudController', templateUrl: '/CapacityControl/max4sales/editForm' }).state('subCategory', { url: '/new/:subCategoryId', controller: 'max4salesCrudController', templateUrl: '/CapacityControl/max4sales/editForm' });I remember when I was creating these states my original inclination was to use 'NewDepartment', 'NewCategory', etc. but then I thought it would not look nice in a url and used 'new' for all states. And apparently it somehow caused the view to execute twice the second time with the departmentId being 2. I changed URLs now the way I originally wanted to name them and all is well.