我的应用程序具有许多用户在决定注册之前可以参考的模块。我想让他们与其他人分开。
然后将延迟加载这些“ PreRegistration”模块。 目录预注册具有一个初始页面模块(最终还有其他模块),这些模块均由pre-reg.module.ts引用:
pre-reg模块是所有PreRegistration模块的集合(在这种情况下,只有1个):
在这种简单情况下,我想将其显示在app.component.html中,以便导入AppModule:
但是在app.component.html中,无法识别启动页面选择器。 SplashPageComponent没有功能,只有一个虚拟html。
但选择器正确。这是app.component.html抱怨缺少参考吗?
我的“可爱”组织似乎是在浪费时间。 有什么想法为什么不被引用? 提前致谢。 :-)瑜伽士
答案 0 :(得分:1)
我假设您忘记了在SplashPageModule中导出SpashPageComponent。
splash-page.module.ts ...
@NgModule({
declarations: [SpashScreenComponent, ....],
exports: [SpashScreenComponent]
})
答案 1 :(得分:1)
这里缺少几件事:
splash-page.module.ts
@NgModule({
declarations: [SpashScreenComponent, ....],
exports: [SpashScreenComponent]
})