Modal component that masks current screen. Underlying components are not subject to any events while the modal component is shown.
<ons-modal>
...
</ons-modal>
See the Pen Alert, confirm and prompt dialogs by Onsen & Monaca (@onsen) on CodePen.
| Name | Type Default Value |
Description |
|---|---|---|
| var | String | Variable name to refer this modal. Optional |
| Signature | Description |
|---|---|
| toggle() | Toggle modal visibility. |
| show() | Show modal. |
| hide() | Hide modal. |
| getDeviceBackButtonHandler() | Retrieve the back button handler. |
Toggle modal visibility.
Show modal.
Hide modal.
Retrieve the back button handler.
Returns: Device back button handler.