[英]NG0303: Can't bind to 'ngIf' since it isn't a known property of 'div' : Angular Modular Federation
NG0303: Can't bind to 'ngIf' since it isn't a known property of 'div' (used in the 'HomeComponent' component template). NG0303:无法绑定到“ngIf”,因为它不是“div”的已知属性(在“HomeComponent”组件模板中使用)。 If the 'ngIf' is an Angular control flow directive, please make sure that either the 'NgIf' directive or the 'CommonModule' is a part of an @NgModule where this component is declared.如果“ngIf”是 Angular 控制流指令,请确保“NgIf”指令或“CommonModule”是声明此组件的@NgModule 的一部分。
MFE- Exposed - HomeModule MFE- 外露 - HomeModule
imports: [
CommonModule,
HomeRoutingModule,
AngularMaterialModule,
ReactiveFormsModule,
FormsModule,
SharedComponentsModule,
LanguageTranslateModule,
NumericOnlyModule,
NgSelectModule,
ToolTipmatModule
],
While Trying in shell Application giving this error在 shell 应用程序中尝试时出现此错误
MFE is an Angular 13 MFE是Angular 13
Shell is an Angular 14 Shell 是 Angular 14
it should be *ngIf or [ngIf] not plain ngIf它应该是 *ngIf 或 [ngIf] 而不是普通的 ngIf
It was CommonModule这是 CommonModule
issue importing commonmodule and removing BrowserModule worked!!导入 commonmodule 和删除 BrowserModule 的问题有效!!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.