I have 2 pages : MainPage and ModalPage.
ModalPage will be a modal
Basically it’s working.
a) MainPageModule imports ModalPageModule,
b) MainPage imports MainPage
c) async open_modal is the function that use modalCtrl with ModalPage as component
But now i would like to use a service which manage ModalController.
ModalService import ModalPage and Dependecy Injection of ModalController
Angular say
!! Error: No component factory found for ModalPage.
!! Did you add it to @NgModule.entryComponents?
I try
- add ModalPage inside declarations and entryComponents arrays of MainPageModule
- add ModalPage inside declarations and entryComponents arrays of ModalPageModule
No way
googling to use modalCtrl inside a service:
https://www.damirscorner.com/blog/posts/20191011-OpeningIonic4ModalsFromACommonService.html
I try this because MainPage use ngrx, and have to manage a lot of state (workflow), i would try to organize it by splitting code into différents services.
Hope somebody could say me where i have to declare ModalPage when i want to use a service that manage ModalController.
Best regards