mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
@ -2,12 +2,6 @@
|
||||
|
||||
A Modal is a dialog that appears on top of the app's content, and must be dismissed by the app before interaction can resume. It is useful as a select component when there are a lot of options to choose from, or when filtering items in a list, as well as many other use cases.
|
||||
|
||||
|
||||
### Creating
|
||||
|
||||
Modals can be created using a [Modal Controller](../modal-controller). They can be customized by passing modal options in the modal controller's `create()` method.
|
||||
|
||||
|
||||
### Dismissing
|
||||
|
||||
The modal can be dismissed after creation by calling the `dismiss()` method on the modal controller. The `onDidDismiss` function can be called to perform an action after the modal is dismissed.
|
||||
@ -255,7 +249,7 @@ customElements.define('modal-page', class extends HTMLElement {
|
||||
|
||||
### Dismissing a Modal
|
||||
|
||||
A modal can be dismissed by calling the dismiss method on the modal controller and optionally passing any data from the modal.
|
||||
A modal can be dismissed by calling the dismiss method and optionally passing any data from the modal.
|
||||
|
||||
```javascript
|
||||
async function dismissModal() {
|
||||
|
||||
Reference in New Issue
Block a user