【发布时间】:2021-05-06 18:16:56
【问题描述】:
我有一个 Angular 11 应用程序,它导入 @angular/material、@ngx-translate 和一个名为 icell-data-table 的库。
从 github 页面下载示例项目,我能够在本地环境中没有任何问题的情况下启动它。
但在将其提取到 Stadckblitz 演示时,我遇到了一个奇怪的错误:
Error in /turbo_modules/@angular/compiler@11.1.1/bundles/compiler.umd.js (3057:21)
Template parse errors:
No provider for NgComponentOutlet ("onentTemplate [cellTemplate]="'componentTemplate'" let-row="row" let-col="col" let-idx="rowIdx">
[ERROR ->]<ng-container
*ngComponentOutlet="col.component; ndcDynamicInputs: getComponentInputs(row, col);"): ng:///DataTableModule/CellTemplatesComponent.html@23:2
Stackblitz project can be found here。关于它缺少什么的任何想法?
更新 1:
正如@yurzui 指出的那样,icell-data-table 和 Angular 11 中存在不兼容的依赖关系。我已将具有适当依赖关系的库更新为 ng-dynamic-component,现在是 Angular11 版本 (^8.0.0)。
但是 stackblitz 示例仍然显示错误:(
【问题讨论】:
-
检查两个环境下所有依赖和配置的版本是否同步
标签: angular ng-component-outlet