I am facing an issue with lazy loading a module, where it is not correctly displaying the desired component. Even though the route seems correct, it shows a different component instead.
https://i.sstatic.net/v4oAB.png
Despite specifying the path for "Push-Campaign", it displays the "Client Targeting" component instead.
Here is a snippet of the code:
const LAYOUT_ROUTES = [navbarRoute, ...errorRoute];
const routes: Routes = [
{
path: 'admin',
data: {
authorities: [Authority.ADMIN],
},
canActivate: [UserRouteAccessService],
loadChildren: () => import('./admin/admin-routing.module').then(m => m.AdminRoutingModule),
},
{
path: 'account',
loadChildren: () => import('./account/account.module').then(m => m.AccountModule),
},
{
path: 'recommended-section',
loadChildren: () => import('./entities/recommended-section/recommended-section.module').then(m=> m.RecommendedSectionModule),
},
{
path: 'push-campaign',
loadChildren: () => import('./entities/push-campaign/push-campaign.module').then(m=> m.PushCampaignModule),
},
{
path: 'customer',
loadChildren: () => import('./entities/customer/customer.module').then(m=> m.CustomerModule),
},
...LAYOUT_ROUTES,
]
@NgModule({
imports: [
RouterModule.forRoot(routes,{ enableTracing: DEBUG_INFO_ENABLED }),],
exports: [RouterModule],
})
export class AppRoutingModule {}
Any insights on why this issue is occurring and potential solutions would be greatly appreciated.
Thank you in advance for your assistance.