How can I make all the misspelled routes go to a page, with the segment of it, that is, if I write (localhost / # / rrerewrwer) that goes to the home with the url (localhost / # /home). Thanks for the answers
How can I make all the misspelled routes go to a page, with the segment of it, that is, if I write (localhost / # / rrerewrwer) that goes to the home with the url (localhost / # /home). Thanks for the answers
I'm not sure, but according to the angular routing documentation, it would be adding the path "**" in the module app-routing.module.ts pointing to the component where you want it to go:
const routes: Routes = [
{ path: 'home', loadChildren: './home/home.module#HomePageModule' },
{ path: 'detail', loadChildren: './detail/detail.module#DetailPageModule' },
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }
];