Reputation: 1575
I have the following state declaration
$stateProvider.state('csh', {
url: "/csh",
views: {
info: {
templateUrl: 'partials/csh.template.html',
controller: 'cshController',
controllerAs: 'ctrl'
}
},
onEnter: function () {
console.log('csh enter');
},
onExit: function () {
console.log('csh exit');
}
});
when i call $state.go('csh')
i see "csh enter" in the console immediately followed by "csh exit" and it goes back to the original state
EDIT: it turns out the $state.go
is throwing a "Error: transition superseded" though I can't find any docs as to what this means
can anyone tell me whats going on please? I'm completely baffled
Upvotes: 1
Views: 87
Reputation: 1575
I managed to fix it, i had a ui-sref in the parent element of the button, so effectively calling 2 states at the same time - school boy!
Upvotes: 1