ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

Feature: When NavOpts {animate: false} "back" button still animate transition

Open escaroda opened this issue 10 years ago • 10 comments

I'm trying to turn off all animations in my Ionic 2 app and I'm doing this with animate: false option inside nav controller. And it works but only when I go forward. When I click "go back" button (which is automatically generated for me) there are still animations goes on. Is there any option that will turn if off too? Or I need to code all back buttons manually?

escaroda avatar May 24 '16 10:05 escaroda

Hey @speciose ! Thanks for opening an issue with us! It is currently not possible to turn off all animations in an Ionic 2 app, but it is definitely worth considering adding in the future. I'm gonna keep this issue open for now, but change it to a feature request. Thanks for using Ionic!

jgw96 avatar May 24 '16 20:05 jgw96

hi @jgw96 , we're having the same problem. we managed to lay off most animations by putting {animate:false} in the navController.pop() method also, though when pressing the hardware back button there's still an animation, navController.setTransition(false) doesn't seem to work either. Is there any update on this?

wouterDumon avatar May 31 '16 12:05 wouterDumon

@wouterDumon At the moment i do not have an update on this. I do have a question though, what is the use case behind turning off all animations?

jgw96 avatar May 31 '16 15:05 jgw96

@jgw96 Since we have multiple kinds of navigation bars ( which we change with the current work-around: https://github.com/driftyco/ionic/issues/5556 ), it acts strange on Ios ( first the animation then the navbar change) hence the removal of the animations.

wouterDumon avatar May 31 '16 15:05 wouterDumon

@wouterDumon Ok, thanks for the feedback! I will update this issue when i have a timeline on it. Thanks for using Ionic!

jgw96 avatar May 31 '16 15:05 jgw96

Hello. We are not planning on adding a feature to turn off all animations at this time, also #5556 has been fixed, so everything should work as expected now. Thanks for using Ionic!

jgw96 avatar Jul 18 '16 19:07 jgw96

Hi @jgw96. I have a similar use case. I have a bottom nav bar which has the next and previous buttons. Now if I keep pushing the pages on android, it obviously looks weird. Because the user would expect to slide the content above the bottom nav bar. But I decided to turn off animations when pushing and popping which looks way better. Now the only thing is that hardware back button still does the pop animation. It would be really great if we could set that too in a component somehow to turn of this animation.

AhsanAyaz avatar Mar 08 '18 14:03 AhsanAyaz

Hi, I have a smilar use case too. My app have animations in slides, i can generate a custom back button in header. So, my app have slide animations in forward and back, but with smartphone back button, "hardware back button", the animation is not slide, it's a standard animation of fading with opacity.

As my app is for a discerning customer, it is bothered by the different animations.

How could I make the animation of the smartphone back button on slide back?

tostavio avatar Apr 11 '18 18:04 tostavio

this.navCtrl.pop({ animate: false });

ahamedthahaneenpm avatar May 04 '18 06:05 ahamedthahaneenpm

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

ionitron-bot[bot] avatar Sep 01 '18 05:09 ionitron-bot[bot]