Reputation: 2620
In Angular, if we have the path like this: :id/myPath
instead of myPath/:id
, how can I use the navigate
method properly?
I need to change the parameter when I'm in current router.
I whish to do something like this:
this.router.navigate([this.router.currentUrl, 1]);
but the id 1
will be placed after the url and not before, what is correct.
How to make it to render before the url? O I need to manually work with strings?
Upvotes: 0
Views: 44