1
在app.module.ts予加载2个懒模块这样懒惰加载模块基座模板
const appRoutes: Routes = [
{ path: 'anonym', loadChildren: './anonym/anonym.module#AnonymModule' },
{ path: 'user', loadChildren: './user/user.module#UserModule', canActivate: [AuthGuard] }
];
在app.component.html我可以写一些基础的HTML。我的问题 - 有什么办法有基本HTML我UserModule? 我试图创建user.component.ts并加载它像app.module.ts
import { UserComponent } from './user.component';
@NgModule({
declarations: [UserComponent],
bootstrap: [UserComponent]
});
但它不告诉我user.component.html