Files
ionic-framework/core/src/components/toast-controller/readme.md
Sarah 04a0e41e67 docs(toast-controller): fix description typo (#18312)
Fix typo in component description text.
2019-05-20 14:23:25 -04:00

1.8 KiB

ion-toast-controller

ToastController is a component used to create Toast components. Please see the docs for Toast.

Methods

create(options?: ToastOptions | undefined) => Promise<HTMLIonToastElement>

Create a toast overlay with toast options.

Parameters

Name Type Description
options ToastOptions | undefined The options to use to create the toast.

Returns

Type: Promise<HTMLIonToastElement>

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

Dismiss the open toast overlay.

Parameters

Name Type Description
data any Any data to emit in the dismiss events.
role string | undefined The role of the element that is dismissing the toast. For example, 'cancel' or 'backdrop'.
id string | undefined The id of the toast to dismiss. If an id is not provided, it will dismiss the most recently opened toast.

Returns

Type: Promise<boolean>

getTop() => Promise<HTMLIonToastElement | undefined>

Get the most recently opened toast overlay.

Returns

Type: Promise<HTMLIonToastElement | undefined>


Built with StencilJS