Here is a list of my routes:
const routes: Routes = [
{
path: '',
component: BlogLayoutComponent,
children: [
{
path: ':pageNumber',
component: HomeComponent
},
{
path: '',
component: HomeComponent
},
{
path: 'article/:id',
component: ArticleComponent
},
{
path: 'articles-by-hashtag/:id',
component: ArticlesByHashComponent
},
{
path: 'articles-by-category/:id',
component: ArticlesByCatComponent
},
{
path: 'about-me',
component: AboutMeComponent
}
]
}
];
All of the routes are functioning correctly, except for navigating to the about-me
page using the routerLink
:
<li><a [routerLink]="[ 'about-me' ]">ABOUT ME</a></li>
When attempting to navigate to the about-me
route, it redirects to the default route if the default parameter :pageNumber
is present. How can I resolve this issue without resorting to using router.navigate(...
? I prefer not to use that method.