-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Angular 4 Routes and Ionic UI #193
Comments
You do not need the The |
Sorry I made a mistake in the before post. I use:
without : prefix. Thanks again. |
Can you post your route definition? The problem can be either in your definition or because the route params is set after the component creation, in which case you need to subscribe to route update like specified here: https://angular-2-training-book.rangle.io/handout/routing/routeparams.html (see "Reading Route Parameters" section). |
Do you still have issues with this? |
Sorry for the delay, the answer is yes. I have the same issue yet but I solve this according to the following code:
employers-routing.module.ts
employers.component.ts
employer.component.ts
shell.component.ts From this way I have get to obtain the id param. I can't to obtain these params according to the documentation. Thanks for your help. |
Thanks for the feedback and sharing your solution! Seems like a bug on the angular router (it would not be the first one 😉 ), you should try opening an issue on the angular repo as it seems to be a pretty nominal use-case for me, and yes according to the docs it should work from what you're sharing. I'm closing the issue since it does not seems to be specific to the generator but rather to the angular router. |
Hi Navigation: this.router.navigate(['/somepath', '123456' ]); Tried this in SomeComponent according to docs: I was unable to fetch the id parameter. Params are always empty. Had a look ad idroxen's workaround, but routeParams is not defined in ShellComponent...?? |
I solved that on this way:
shell.component.ts How I used it:
my-awesome-componet.component.ts I hope it helps you |
In your case you should use |
Thanks, idroxen. |
Finally solved this by putting Hope this helps anyone stumbling over it. |
Using |
I have a problem when im trying to obtain params from Angular 4 Routes.
Im using:
According to the Angular Routes guide that is how to obtain params, but it show null.
What am I doing wrong?
Thanks!
The text was updated successfully, but these errors were encountered: