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

stickyModal not working for $state.go #357

Open lbngoc opened 7 years ago

lbngoc commented 7 years ago

I follow "Minimal Modal Sticky States demo" to create this codepen: http://codepen.io/lbngoc/pen/zoVMEE Currently, the modal is showing when use "ui-sref", but when I go to state from $state.go, nothing is happened... Please help to take a look and give me some advices..

bigb6611 commented 7 years ago

It works with a few tweaks to your code! ;-)

http://codepen.io/anon/pen/egBgJp

lbngoc commented 7 years ago

@bigb6611 so we need stop the event to keep the code working, right ?

bigb6611 commented 7 years ago

@lbngoc, that's right!

One other thing I noticed in your pen is the scope function name referenced on the ng-click event does not match the one defined on the root scope: openLoginModal vs openModalLogin

With this typo fixed, it all seems to work fine!