christopherthielen / ui-router-extras

THIS PROJECT IS NO LONGER MAINTAINED -- Extras for UI-Router for AngularJS. Sticky States (a.k.a. parallel states), Deep State Redirect (for tab-like navigation), Future States (async state definition)
http://christopherthielen.github.io/ui-router-extras/
MIT License
917 stars 211 forks source link

Is $previousState working in v.0.1.3? #351

Open random-one opened 7 years ago

random-one commented 7 years ago

Here is my flow: I'm in a state like this root.home.stateA and the server returns 401 for a request fired in this state. A redirect to root.login is done in interceptor that catches the 401 status but before it I call $previousState.memo('login-redirect'). After a successful login I try to redirect to $previousState.get('login-redirect'), but it always returns null.

I tried also without giving a name to the previous state, but didn't work either.

angular-1.5.8 ui-router-0.3.1 ui-router-extras-0.1.3

zcfDafei commented 7 years ago

Do you have "$previousState" examples?