i have declared routes like below
const routes: Routes = [
{
path: '',
component: NgxMindxRunComponent,
data: {
reuse: true
},
children: [
{
path: '',
component: NgxMindxRunDiagramComponent,
data: {
reuse: true
}
},
{
path: 'load/:id',
component: NgxMindxRunDiagramComponent,
data: {
reuse: true
}
},
{
path: 'file/:fileName',
component: NgxMindxRunDiagramComponent,
data: {
reuse: true
},
}],
}
];
and the issue is when current route is : http://localhost:4200/run/ then i navigate to "http://localhost:4200/run/file/1" every thing is OK! but when i navigate from "http://localhost:4200/run/file/1" to the "http://localhost:4200/run/file/2" the shouldReuseRoute method is not firing then cant store component!! there is same issue for "http://localhost:4200/run/load/..." it means i'm trying to call store method on RouteReuseStrategy class which i provided in app.module , but i cant reach i tried to find same question but i didn't find anything my other question is , is it OK i used same component with different path , is it make issue in route reuse Strategy usage?
I've encountered the same problem in the past, I've solved this with the following addition in the component: