Created
February 29, 2016 02:37
-
-
Save msrivastav13/2b214b9cc709d7aba3c2 to your computer and use it in GitHub Desktop.
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 characters
<aura:component> | |
<div> Hello World !!!! </div> | |
<aura:registerEvent name="myevent" type="c:myEvent" /> | |
<ui:button label="fireEvent" press="{!c.fireevent}" /> | |
</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 characters
({ | |
fireevent: function(component, event, helper) { | |
var myEvent = $A.get("e.c:myEvent"); | |
myEvent.setParams({"data":"Test"}); | |
myEvent.fire(); | |
} | |
}) |
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 characters
<aura:event type="APPLICATION"> | |
<aura:attribute type="string" name="data" /> | |
</aura:event> |
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 characters
<aura:application access="GLOBAL" extends="ltng:outApp"> | |
<aura:dependency resource="c:myComponent" /> | |
</aura:application> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment