Newer Version Available

This content describes an older version of this product. View Latest

aura:waiting

Indicates that the app is waiting for a response to a server request. This event is fired before aura:doneWaiting.

We don't recommend using the legacy aura:waiting event except as a last resort. The aura:waiting application event is fired for every server request, even for requests from other components in your app. Unless your component is running in complete isolation in a standalone app and not included in Lightning Experience or Salesforce1, you probably don’t want to handle this application event. The container app may fire server-side actions and trigger your event handler multiple times.

Note

This event is automatically fired when a server-side action is added using $A.enqueueAction() and subsequently run, or when it’s expecting a response from an Apex controller. The aura:waiting event is handled by a client-side controller. A component can have only one <aura:handler> tag to handle this event.
This example shows a spinner when aura:waiting is fired.
This client-side controller fires an event that displays the spinner.
The aura:waiting handler contains these required attributes.
Attribute Name Type Description
event String The name of the event, which must be set to aura:waiting.
action Object The client-side controller action that handles the event.