angularwebpackmicro-frontendangular-module-federation

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). 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.

MFE- Exposed - HomeModule

imports: [
    CommonModule,
    HomeRoutingModule,
    AngularMaterialModule,
    ReactiveFormsModule,
    FormsModule,
    SharedComponentsModule,
    LanguageTranslateModule,
    NumericOnlyModule,
    NgSelectModule,
    ToolTipmatModule

  ],

While Trying in shell Application giving this error

MFE is an Angular 13

Shell is an Angular 14


Solution

  • It was CommonModule

    issue importing commonmodule and removing BrowserModule worked!!