Type: feat
Ionic Version: 2.x
Platform: android 5.1 webview
It would be nice to have an option which allows to get transitions when navigating to the root page. Could be especially useful when using a toolbar in the navbar. Something like this: nav.setRoot(Page, {animate: true});
This is currently possible using the following:
this.nav.setRoot(Page, {}, {animate: true, direction: 'forward'});
The second param is any parameters to pass to the next view. See the NavController docs.
Is this what you're looking for?
@brandyscarney thanks a lot, this works!
Can this be used somehow to solve #5101 to get transitions for tab changes (Android)? Something like (click)="foo()" on an ion-tab and afterwards setting the new root page like described above.
@brandyscarney thanks again - forget the tab question - I think these are different stories.
Maybe some documentation is needed regarding the option param but otherwise the issue can be closed.
@rdesimone Awesome! I created an issue to add better documentation behind it here: https://github.com/driftyco/ionic/issues/6372
Going to close this. :smile:
@brandyscarney I would like to come back on my question from above. Is is possible to control somehow the tab change with setRoot. Selecting an ion-tab will not automatically change the tab. The change will happen when setRoot is called. This is related to #5101. Thanks a lot for your help!
Most helpful comment
This is currently possible using the following:
The second param is any parameters to pass to the next view. See the NavController docs.
Is this what you're looking for?