I'm facing an issue with the lazy loading module. Every time I try to use it, Formly throws an error
ERROR Error: [Formly Error] The type "input" could not be found. Please ensure that it is registered through the FormlyModule declaration.
The project structure I have is as follows:
Appmodule:
PublicModule:
AuthModule
In my Auth module, I have defined routes like this:
const routes: Routes = [
{
path: '',
component: AuthComponent,
children: [
{
path: 'login',
component: LoginComponent
}
]
}
registered using RouterModule.forChild(routes)
My PublicModule only has:
RouterModule.forChild([
{
path: 'user',
loadChildren: () => import('./auth/auth.module').then(m => m.AuthModule)
}
]),
And in AppModule, I have the following:
const routes: Routes = [
{
path: '',
component: HomeComponent
}
];
registered using RouterModule.forRoot(routes)
I am unsure why Angular is throwing an exception when I open the login link.
Thank you for any help in advance!