Answer the question
In order to leave comments, you need to log in
How to pass empty to /en /ru route in Angular 2+?
Hello. I apologize if I didn't formulate the question correctly. But I don’t even know how it is correctly called by terms :). There is a project. There are pages, say 'domain.com/news/atricle12312'. I usually write like this:
{
path: 'main',
loadChildren: './pages/main/main.module#MainModule'
},
{
path: 'news',
loadChildren: './pages/news/news.module#NewsModule'
},
{
path: 'confirmation',
component: ConfirmationComponent
},
{
path: '404',
component: PageNotFoundComponent
},
{
path: '',
redirectTo: '/main',
pathMatch: 'full'
},
{
path: '**',
redirectTo: '/404',
pathMatch: 'full'
}
];
Answer the question
In order to leave comments, you need to log in
I threw a mini example, I hope the concept will be clear
- link
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question