I want to force a trailing slash on default path.
I used as reference: https://www.c-sharpcorner.com/article/angular-7-routing-with-preserving-trailing-slash-in-url/
My implementation works on every route except the default path ''.
In my app routing module I have:
const routes: Routes = [
{
path: '',
loadChildren: () => import('./pages/home/home.module').then(m => m.HomeModule)
},
{
path: 'about/.',
loadChildren: () => import('./pages/about-us/about-us.module').then(m => m.AboutUsModule)
},
My links look like:
<a routerLink="/" routerLinkActive="active" [routerLinkActiveOptions]= "{exact: true}">Home</a></li>
<a routerLink="/about/." routerLinkActive="active" [routerLinkActiveOptions]= "{exact: true}">About</a></li>