None of the above answers solved my problem. Here's how to solve the same error. You should not have more than one component as a component of Bootstarp. So, in the Bootstrap array there should be only one component. By mistake, I put 4 components in the bootstrap array. I removed these 4 components and put them in an entryComponents array (as shown in the code below). It helped me.
@NgModule({ declarations: [ AppComponent, SanackBarBodyComponent, SuccessNavBarComponent, AlertNavBarComponent, NormalNavBarComponent ], entryComponents:[ SanackBarBodyComponent, SuccessNavBarComponent, AlertNavBarComponent, NormalNavBarComponent ], imports: [ BrowserModule, BrowserAnimationsModule ], providers: [], bootstrap: [AppComponent ] }) export class AppModule { }
DIBYA RANJAN TRIPATHY May 27 '19 at 9:44 a.m. 2019-05-27 09:44
source share