I have a problem with routing that I can not fix.
I try to access the path / admin / login and it directs me to the root with a blank page and the following error in the console:
ZoneAwareError {__zone_symbol__error: Error: Uncaught (in promise): Error Error at Error.ZoneAwareError (http://localhost:4200/polyfil……}
The other routes if they work
app.routing.module.ts
const appRoutes: Routes = [
{ path: 'admin', loadChildren: 'app/admin/admin.module#AdminModule'},
{ path: '', component: HomeComponent }
];
@NgModule({
imports: [ RouterModule.forRoot(appRoutes) ],
exports: [ RouterModule ]
})
admin.routing.module.ts
const AdminRoutes: Routes = [
{ path: 'login', component: AdminLoginComponent },
{ path: 'home', component: AdminHomeComponent },
{ path: '', component: AdminComponent },
];
@NgModule({
imports: [ RouterModule.forChild(AdminRoutes) ],
exports: [ RouterModule ]
})