angularjs - Angular - ui-router get previous state -
is there way previous state of current state?
for example know previous state before current state b (where previous state have been state a).
i not able find in ui-router github doc pages.
ui-router doesn't track previous state once transitions, event $statechangesuccess
broadcast on $rootscope
when state changes.
you should able catch prior state event (from
state you're leaving):
$rootscope.$on('$statechangesuccess', function (ev, to, toparams, from, fromparams) { //assign "from" parameter });
Comments
Post a Comment