0
I have a Component, where it receives only one parameter in its route, this way below:
{path: ':modelo', component: BaseNumerica,
This Commission, in turn, has 3 daughter routes, described as follows:
{path: ':modelo', component: BaseNumerica,
children: [
{path: '', redirectTo: 'teste1', pathMatch: 'full'},
{path: 'teste1', component: Personal},
{path: 'teste2', component: Dealers},
{path: 'teste3', component: Agendamento}
]},
I am having difficulty accessing the route 'teste2', by the 'teste1' route Component, that is, in my Component teste1.html I have the following call:
[routerLink]="['teste2']"
and the following error is presented:
Error: Cannot match any routes. URL Segment: 'modelo/teste1/teste2'
This error does not happen if I do the same button in the 'Basenumerica' system. What should I do?
William this happens by just passing test2 he understands that you intend to access a level above the current. That’s why from Basenumerica you access the teste2 without problems passing only it. To access from the teste1 you need to pass the full path in this case. ['/:model/teste2'] at the link
– Lucas Brogni