You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend the navigateForward and navigateBack functionality of the NavController to support both Angular's router.navigateByUrl and Angular's router.navigate.
Currently, navigateForward and navigateBack call Angular's router.navigateByUrl.
The difficult posed by this is that Angular's router.navigateByUrl does not implement some of the NavigationExtras such as { queryParams: { foo: fooValue } }.
See angular/angular#22611
Describe Preferred Solution
It would be very helpful to extend the navController to have 4 methods:
navigateForward - that uses Angular's router.navigate call
navigateForwardByUrl - that uses Angular's router.navigateByUrl call
navigateBack - that uses Angular's router.navigate call
navigateBackByUrl - that uses Angular's router.navigateByUrl call
This would allow developers to use all the functionality provided by Angular's router navigation functionality.
Currently, developers can't use the Ionic Nav Controller methods if they want to use common application features such as query params.
Describe Alternatives
Workaround is to use Angular's router.navigate call directly but then developers don't get the animation benefits of the Ionic NavController.
@manucorporat, in 7aa4f13, you forgot to add | any[] to the signature of the first parameter of the methods navigateBack() and navigateRoot(). You only did it on navigateForward().
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.
Feature Request
Ionic Info
Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Feature Request
Extend the navigateForward and navigateBack functionality of the NavController to support both Angular's router.navigateByUrl and Angular's router.navigate.
Currently, navigateForward and navigateBack call Angular's router.navigateByUrl.
The difficult posed by this is that Angular's router.navigateByUrl does not implement some of the NavigationExtras such as { queryParams: { foo: fooValue } }.
See angular/angular#22611
Describe Preferred Solution
It would be very helpful to extend the navController to have 4 methods:
This would allow developers to use all the functionality provided by Angular's router navigation functionality.
Currently, developers can't use the Ionic Nav Controller methods if they want to use common application features such as query params.
Describe Alternatives
Workaround is to use Angular's router.navigate call directly but then developers don't get the animation benefits of the Ionic NavController.
Related Code
None
Additional Context
angular/angular#22611
The text was updated successfully, but these errors were encountered: