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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -