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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -