angular-mobile-nav icon indicating copy to clipboard operation
angular-mobile-nav copied to clipboard

modal+slide+reverse behaviour

Open revolunet opened this issue 11 years ago • 1 comments

For some reason the modal + $navifate.back() behaves strangely on my demo page

http://revolunet.github.com/angular-mobile-demo

1- click "modal" in the top toolbar -> $navidate.go('/modal'); 2- click "close modal" in the modal -> $navigate.back() this behaves perfectly.

then : 1- click "modal" in the top toolbar -> $navidate.go('/modal'); 2- click "home" in the top toolbar -> $navidate.go('/', 'slide', true); // reverse 3- click "modal" in the top toolbar -> $navidate.go('/modal'); 4- click "close modal" in the modal -> $navigate.back()

the modal transition is now broken for some reason.

is it my bad implementation ?

revolunet avatar Mar 06 '13 01:03 revolunet

I know this is an old comment, but I ran into this same bug as well. It has to do with the line $navigate.go('/', 'slide', true); // reverse. For some reason, if you use the reverse flag, it sets the rest of the $navigate.back() transitions to reverse (again), meaning they go in the non-reverse order. Unfortunately, I had to take the reverse flag out and just use the standard $navigate.go('/home'). This way the reverse transition didn't affect the back button. I'm not sure where in the library it's storing the reverse order, but it seems like when $navigate.back() is called, it shouldn't save the reverse state from the previous transition. I'm not 100% sure how to fix this in the library, though.

opes avatar Aug 20 '13 17:08 opes