I have 2 lazy loaded routes:
const routes: Routes = [
{
path: '',
redirectTo: 'login',
pathMatch: 'full'
},
{
path: 'login',
loadChildren: () => import('./login/login.module').then(m => m.LoginModule)
},
{
path: 'dashboard',
loadChildren: () => import('./dashboard/dashboard.module').then(m => m.DashboardModule)
}
];
And dashboard route has children routes.
const routes: Routes = [
{
path: '',
component: DashboardComponent,
children: [
{
path: '',
component: HomeComponent
},
{
path: 'usuarios',
component: UsersComponent
}
]
}
]
I have created a toolbar reusable component, which I wanna render on dashboard router-outlet, but when I navigate to the children routes of dashboard module, angular compiler says that the app-toolbar is not a component.
I've added the component on Dashboard module and tried on AppModule too, but I get the same result. Am I missing something?