Topic: There is no directive with "exportAs" set to mdbModal
Hello
I read the previous answers on the subject well but that does not solve my problem. I have the error on the definition of my modal:
here is what i have in app.module.ts:
@NgModule ({ statements: [ AppComponent, VieComponent, AbsComponent, LoginComponent, AbsComponentRequests, FilterRequestAbsPipe, FilterRequestPipe, FilterJeuViePipe, FilterSearchTextPipe, FilterActorPipe, ConcatIdLibJeu, ModalConfirm, LifeGameComponent, LifeRequestComponent, ParametersComponent, ParametersComponentGroup, ParametersActorComponent, ParametersComponentMessages, ParametersLimitsComponent, ErrorServerComponent ], imports: [ BrowserModule, BrowserAnimationsModule, HttpClientModule, ReactiveFormsModule, FormsModule, Ng2SearchPipeModule, NgxPaginationModule, OrderModule, MDBBootstrapModulesPro.forRoot (), ToastModule.forRoot (), RouterModule.forRoot (appRoutes, {useHash: true}) ], diagrams: [NO_ERRORS_SCHEMA], providers: [ {provide: "DomaineWebService", useClass: environment.domaineServiceType}, {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}, AuthenticationService, ApiService, FileUtil, MiscellaneousService, DataService, DatePipe ], entryComponents: [ ModalConfirm ], bootstrap: [AppComponent]
}) export class AppModule { }
Thank you for your help
Answered
- User: Pro
- Premium support: No
- Technology: Angular
- MDB Version: 7.4.0
- Device: pc
- Browser: chrome
- OS: windows 7
- Provided sample code: No
- Provided link: No
Arkadiusz Idzikowski staff commented 11 months ago
Please add the html code you use to render MDB modal to your post.
herve pro commented 11 months ago
here is the html code :
in my ts file I use this code to dynamiccaly show the modal :
Thank you
Arkadiusz Idzikowski staff commented 11 months ago
When is the
loadedId.show()called in the component ts? Does this problem occur also when you try to open modal by clicking on the icon?If you use lazy loading modules, you need to import MDB modules for specific components in every lazy loaded module. Because these modules will not have access to the imports of root module.