【发布时间】:2020-10-14 17:15:24
【问题描述】:
我的 Angular 9 应用程序中有两个模块 只有一个模块使用角材料。 所以我的 app.module.ts 不加载它,我使用延迟加载 但是当我运行该应用程序时,它会显示错误
NullInjectorError: R3InjectorError(t)[InjectionToken mat-select-scroll-strategy -> InjectionToken mat-select-scroll-strategy -> InjectionToken mat-select-scroll-strategy -> InjectionToken mat-select-scroll-strategy]: NullInjectorError: InjectionToken mat-select-scroll-strategy 没有提供者!
请有人帮忙。
【问题讨论】:
-
我相信这与github.com/angular/components/issues/19335有关,不幸的是这个错误并没有得到很大的关注。
-
我认为材料模块应该在第一个实例上加载
标签: angular angular-material lazy-loading