Creating application events

To create an application event, you need to define the a.evt file, as follows. Let's name the file appEvent:

<aura:event type="APPLICATION" description="Event template">
<aura:attribute name="message" type="String"/>
</aura:event>

Notice that we have type="APPLICATION"; you can also define as many attributes as you like, for sending data via the events. Note that when fired, attributes carry payload data along with the event, and the listener component can read the payload.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.136.84