Please how to pass data betwen pages (ionic 4) with this.router.navigateByUrl(‘page’);
Hi @fahd123
It can be done like in any other Angular app:
-
If you don’t mind having this data shown in the URL, you can use the
extras: NavigationExtras
parameter ofnavigateByUrl()
: https://angular.io/api/router/Router#navigatebyurl -
If you don’t want this data exposed in the URL, you can use a service that gets and sets this data between components (pages): https://angular.io/guide/component-interaction#parent-and-children-communicate-via-a-service
Best,
Rodrigo
1 Like
Hi, check these videos :
1 Like
Thanks nesbhm this video * https://www.youtube.com/watch?v=jRxPOs1OM34
solved my problem
Thanks again