Я пытаюсь перенаправить на другой компонент, например так:
HomeComponent
checkUrl(reference) {
if (reference != this.ref) {
this.router.navigate(['/еrror']);
}
}
вот мой модуль маршрутизатора
const routes: Routes = [
{ path: '', component: DefaultComponent },
{
path: '',
children: [
{ path: ':dlr/:id/:ref', component: HomeComponent },
{ path: 'error', component: ErrorPageComponent },
]
},
{ path: '**', redirectTo: '', pathMatch: 'full' }
];
сейчас я нахожусь в HomeComponent и хочу go на страницу с ошибкой.
this.router.navigate (['/ еrror']) это приводит меня к DefaultComponent