ion-popover-controller

Contents

Popover controllers programmatically control the popover component. Popovers can be created and dismissed from the popover controller. View the Popover documentation for a full list of options to pass upon creation.

Usage

async function presentPopover() {
  const popoverController = document.querySelector('ion-popover-controller');
  await popoverController.componentOnReady();

  const popoverElement = await popoverController.create({
    component: 'profile-page',
    event: event
  });
  return await popoverElement.present();
}

Methods

create

Description

Create a popover overlay with popover options.

Signature create<T extends ComponentRef>(options: PopoverOptions<T>) => Promise<HTMLIonPopoverElement>

dismiss

Description

Dismiss the open popover overlay.

Signature dismiss(data?: any, role?: string | undefined, id?: string | undefined) => Promise<boolean>

getTop

Description

Get the most recently opened popover overlay.

Signature getTop() => Promise<HTMLIonPopoverElement | undefined>