Skip to main content
Use this API to show a loading indicator during asynchronous operations.

Parameters

PropertyTypeRequiredDescription
contentStringNoLoading text message
delayNumberNoDelay before showing (ms)
successFunctionNoCallback on success
failFunctionNoCallback on failure
completeFunctionNoCallback that always executes

Code Example

my.showLoading({ content: 'Loading...' });

my.request({
  url: 'https://api.example.com/data',
  complete: () => {
    my.hideLoading();
  }
});

my.hideLoading

Hide loading

my.showToast

Show toast