ionicPopover

Instantiated by the $ionicPopover service.

Be sure to call remove() when you are done with each popover to clean it up and avoid memory leaks.

Note: a popover will broadcast ‘popover.shown’, ‘popover.hidden’, and ‘popover.removed’ events from its originating scope, passing in itself as an event argument. Both the popover.removed and popover.hidden events are called when the popover is removed.

Methods

initialize(options)

Creates a new popover controller instance.

Param Type Details
options object

An options object with the following properties:

  • {object=} scope The scope to be a child of. Default: creates a child of $rootScope.
  • {boolean=} focusFirstInput Whether to autofocus the first input of the popover when shown. Default: false.
  • {boolean=} backdropClickToClose Whether to close the popover on clicking the backdrop. Default: true.
  • {boolean=} hardwareBackButtonClose Whether the popover can be closed using the hardware back button on Android and similar devices. Default: true.

show($event)

Show this popover instance.

Param Type Details
$event $event

The $event or target element which the popover should align itself next to.

  • Returns: promise A promise which is resolved when the popover is finished animating in.

hide()

Hide this popover instance.

  • Returns: promise A promise which is resolved when the popover is finished animating out.

remove()

Remove this popover instance from the DOM and clean up.

  • Returns: promise A promise which is resolved when the popover is finished animating out.

isShown()

  • Returns: boolean Whether this popover is currently shown.