Search docs/

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 popoverElement = Object.assign(document.createElement('ion-popover'), {
    component: 'profile-page',
    event: event
  });
  document.body.appendChild(popoverElement);
  return await popoverElement.present();
}

Methods

create

Description

Create a popover overlay with popover options.

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

dismiss

Description

Dismiss the open popover overlay.

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

getTop

Description

Get the most recently opened popover overlay.

SignaturegetTop() => Promise<HTMLIonPopoverElement | undefined>