-
-
Save karkranikhil/e47a4713b0c3884255b23e3232ec9181 to your computer and use it in GitHub Desktop.
Revisions
-
pozil revised this gist
Mar 23, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <aura:event type="COMPONENT"> <aura:attribute name="param" type="String"/> </aura:event> -
pozil created this gist
Mar 23, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ <aura:component> <aura:handler name="myComponentEvent" event="c:componentEvent" action="{!c.handleMyComponentEvent}"/> <c:componentEventSender/> </aura:component> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ({ handleMyComponentEvent : function(component, event, helper) { var value = event.getParam("param"); alert("Received component event with param = "+ value); } }) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ <aura:component> <aura:registerEvent name="myComponentEvent" type="c:componentEvent"/> <lightning:button label="Fire component event" onclick="{! c.fireMyComponentEvent }" /> </aura:component> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ ({ fireMyComponentEvent : function(component, event, helper) { var myEvent = component.getEvent("myComponentEvent"); myEvent.setParams({"param": "It works!"}); myEvent.fire(); } })