У меня есть приложение Angular 8. В моем модуле маршрутизатора у меня есть что-то вроде
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: ':code', component: CodeComponent },
{ path: 'not-found', component: NotFoundComponent},
{ path: '**', component: NotFoundComponent }
];
Проблема здесь в том, что при доступе (например) /not-found
компонент CodeComponent
активируется, но не NotFoundComponent
.
Хочу отличить guish /not-found
страницу от параметризованной /:code