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

feat($previousState): allow to memo a state passed by parameter. #302

Closed gabrielmaldi closed 8 years ago

gabrielmaldi commented 8 years ago

Add a set method to $previousState to programmatically set the previous state.

christopherthielen commented 8 years ago

So you want to programmatically set the previous state?

What if we added .set(memoName, previousState, previousParams) instead?

gabrielmaldi commented 8 years ago

Your approach is far better the overloading the meaning of memo and defaultStateName. Updated the PR!

christopherthielen commented 8 years ago

Thanks! Would you mind adding .set to the docs?

here: https://github.com/christopherthielen/ui-router-extras/blob/gh-pages/partials/previous/api.html#L6-L22

gabrielmaldi commented 8 years ago

Done in #303