Files
ionic-framework/core/src/components/loading-controller
Manu MA 34dfc3ce98 refactor(all): updating to newest stencil apis (#18578)
* chore(): update ionicons

* refactor(all): updating to newest stencil apis

* fix lint issues

* more changes

* moreee

* fix treeshaking

* fix config

* fix checkbox

* fix stuff

* chore(): update ionicons

* fix linting errors
2019-06-23 11:26:42 +02:00
..
2018-08-26 19:06:50 +02:00
2019-06-19 21:33:50 +02:00

ion-loading-controller

Loading controllers programmatically control the loading component. Loadings can be created and dismissed from the loading controller. View the Loading documentation for a full list of options to pass upon creation.

Usage

Javascript

async function presentLoading() {
  const loadingController = document.querySelector('ion-loading-controller');
  await loadingController.componentOnReady();

  const loadingElement = await loadingController.create({
    message: 'Please wait...',
    spinner: 'crescent',
    duration: 2000
  });
  return await loadingElement.present();
}

Methods

create(options?: LoadingOptions | undefined) => Promise<HTMLIonLoadingElement>

Create a loading overlay with loading options.

Returns

Type: Promise<HTMLIonLoadingElement>

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

Dismiss the open loading overlay.

Returns

Type: Promise<boolean>

getTop() => Promise<HTMLIonLoadingElement | undefined>

Get the most recently opened loading overlay.

Returns

Type: Promise<HTMLIonLoadingElement | undefined>


Built with StencilJS