I'm using the state definitions below(UI-Router's). Once I invoke $state.go('products.new') the controller (ProductCtrl) is invoked twice.
For some reason, UI Router "forgets" the original state change and invokes the controller based on the url only (which is indeed ambiguous in this case).
If I arrive at the page directly though (deep link) the controller is invoked once as it should.
Any suggestion how to make it work?
.state('products', {
abstract: true,
template: "<div ui-view></div>"
})
.state('products.product', {
url: '/products/:productId',
templateUrl: 'views/productView.html',
controller: 'ProductCtrl'
})
.state('products.new', {
url: '/products/new',
templateUrl: 'views/productView.html',
controller: 'ProductCtrl'
})