简体   繁体   English

延迟加载模块的子路径不在角元素中工作

[英]Lazy Loaded module's children route not working in angular elements

I'm lazyloading a feature module inside an Angular Element project. 我在Angular Element项目中懒惰加载一个特征模块。

loadChildren: './crisis-center/crisis-center.module#CrisisCenterModule',

If in my lazy loaded module routes there is a route with component and children all the module route stop working with the error: 如果在我的延迟加载模块路由中有一个包含组件和子节点的路由,则所有模块路由都停止处理错误:

No component factory found for CrisisListComponent. Did you add it to @NgModule.entryComponents?

Here you can see a stackblitz of the problem. 在这里你可以看到问题的stackblitz The test project is forked from this Angular tutorial Stackblitz and the only changes are the one needed for Elements. 测试项目是从这个Angular教程Stackblitz分而来的 ,唯一的变化就是Elements所需的变化。

I'm missing something or is this an Angular Element bug? 我错过了什么或者这是一个Angular Element bug?

如果你想使用自定义元素作为外部组件在其他应用程序中使用,那么你需要使用我不喜欢的非常懒的加载模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM