Open Modal from Popover item

Hi all,
I need to open a modal page from my popover menu.

I created my Popover Component and I open it in my Home Page.
In the Popover content, there are some items. When I click on one of this, I want to open Modal Page and used this code:

    const modal = await this.modalController.create({
      component: QuizListPage,
      cssClass: 'my-custom-class'
    });
    return await modal.present();

When this cose execuded into console there is an error:

ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(MainPageModule)[IonRouterOutlet -> IonRouterOutlet -> IonRouterOutlet -> IonRouterOutlet]: 
  NullInjectorError: No provider for IonRouterOutlet!
NullInjectorError: R3InjectorError(MainPageModule)[IonRouterOutlet -> IonRouterOutlet -> IonRouterOutlet -> IonRouterOutlet]: 
  NullInjectorError: No provider for IonRouterOutlet!
    at NullInjector.get (core.js:915)
    at R3Injector.get (core.js:11082)
    at R3Injector.get (core.js:11082)
    at R3Injector.get (core.js:11082)
    at NgModuleRef$1.get (core.js:24199)
    at R3Injector.get (core.js:11082)
    at NgModuleRef$1.get (core.js:24199)
    at Object.get (core.js:22102)
    at getOrCreateInjectable (core.js:3921)
    at ɵɵdirectiveInject (core.js:13753)
    at resolvePromise (zone-evergreen.js:798)
    at zone-evergreen.js:705
    at rejected (tslib.es6.js:74)
    at ZoneDelegate.invoke (zone-evergreen.js:364)
    at Object.onInvoke (core.js:27437)
    at ZoneDelegate.invoke (zone-evergreen.js:363)
    at Zone.run (zone-evergreen.js:123)
    at zone-evergreen.js:857
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:27425)

What is the dependency missing?
Is this approch correct?

Thanks to all

L

The problem is the same if I open the modal page from my Home Page, without popover

Support me please

This code will not likely show the error. Which one does I dont know

Either publish a repo and or stackblitz

Or I recommend starting a new project, build a simple modal in there using the doc and then see from there, or slowly build and test from there