I have a system where I select an element. I would to refresh my main component each time I change this element. It's okay everywhere except on the main page.
Example by the code. It's the concerned part in my app-routing.module.ts :
/******* Default route *******/
{
path: '',
redirectTo: '/' + Route.DASHBOARD,
pathMatch: 'full'
},
/******* DASHBOARD *******/
{
path: Route.DASHBOARD, component: DashboardComponent,
canActivate: [AuthGuard],
data: {
title: i18nlib.TITLE.DASHBOARD,
icon: constant.ICON.DASHBOARD,
breadcrumb: i18nlib.TITLE.DASHBOARD
}
},
When I'm on the root URL, I'm redirected on the dashboard page : it's okay. The refresh of the page from the component is okay on each page. When I'm on the dashboard page and I want to reload my page from the same component, it doesn't work.
If I comment this part :
/******* Default route *******/
{
path: '',
redirectTo: '/' + Route.DASHBOARD,
pathMatch: 'full'
},
... it works.
Someone knows why it's not possible to do the both at the same time... ? I don't understand why...
Thank you very much for helping !