0
I have an application that uses angular V6, I have a route system where I can pass a parameter, in order to access another component, an id for example, however, I need to pass two parameters in this route that is currently:
{ path: 'edit/:id', component: ProfilesEditComponent }
With the call to that route configured like this:
private edit(item: IProfiles): void {
this.router.navigate([`/profiles/${this.appId}/edit`, item.id]);
}
With my need to pass two parameters to the route, I’d like something like this:
{ path: ':appId/edit/:id', component: ProfilesEditComponent }
After making the route change, I made the following call:
private edit(item: IProfiles): void {
this.router.navigate([`/profiles`, this.appId, 'edit', item.id]);
}
However, it does not work, on the console it says that a configured route could not be found.
Is it possible to pass more than one parameter within the route? Because with only one parameter it works normally.
I believe that the excerpt "I tried the call to that component so..." is duplicated, because this does not seem to be the call.
– Leonardo Lima
I ended up getting in the way of copying and pasting!
– LuizCostaa