ons-modal

Modal component that masks current screen. Underlying components are not subject to any events while the modal component is shown.

Usage #

<ons-modal>
  ...
</ons-modal>

Live Example #

See the Pen Alert, confirm and prompt dialogs by Onsen & Monaca (@onsen) on CodePen.

See also #

Attributes #

Name Type
Default Value
Description
var String Variable name to refer this modal. Optional

Methods Summary #

Signature Description
toggle() Toggle modal visibility.
show() Show modal.
hide() Hide modal.
getDeviceBackButtonHandler() Retrieve the back button handler.

Methods

toggle() #

Toggle modal visibility.

show() #

Show modal.

hide() #

Hide modal.

getDeviceBackButtonHandler(): Object #

Retrieve the back button handler.

Returns: Device back button handler.

Discussion #