How do you use Popovercontroller?


#1

Ok, I’m currently using Ionic 4.

I’m calling the controller as below,

  async onAdditionalEvidenceSelected({event}) {
    const popover = await this.popoverCtrl.create({
      component: "PopupMenu",
      ev: event,
      translucent: true
    });
    return await popover.present();
  }

I’ve created a component and imported the shared module in App, and the Page, neither work.

import { PopupMenuComponentModule } from '../../components/popup-menu/popup-menu.module';

It complains that it wants to be an entry component,

Error: Uncaught (in promise): Error: No component factory found for PopupMenuPage. Did you add it to @NgModule.entryComponents?

So I tried adding it as an entry component,

PopupMenuPageModule cannot be used as an entry component.
Error: PopupMenuPageModule cannot be used as an entry component.

I’ve read that it can’t be used as a component and must be an Ionic Page (https://github.com/ionic-team/ionic/issues/11111) but that won’t work either.

import { PopupMenuPageModule } from './../popup-menu/popup-menu.module';

I’m tearing out what little hair I have left, ha

Any help appreciated.

Thanks