Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!--c:eventHandler-->
<aura:component>
<aura:attribute name="messageFromEvent" type="String"/>
<aura:attribute name="numEvents" type="Integer" default="0"/>
<!-- Note that name="cmpEvent" in aura:registerEvent
in ceNotifier.cmp -->
<aura:handler name="cmpEvent" event="c:testEvent" action="{!c.handleComponentEvent}"/>
<!-- handler contains the notifier component -->
<c:eventNotifier />
<p>{!v.messageFromEvent}</p>
<p>Number of events: {!v.numEvents}</p>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.