Created
February 29, 2016 02:39
-
-
Save msrivastav13/69014c360ac5fff683a3 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
<apex:page showHeader="false" sidebar="false"> | |
<apex:includeLightning /> | |
<div id="lightning"> Hello world VF ..!!! </div> | |
<script> | |
$Lightning.use("c:myEventApp", function() { | |
$Lightning.createComponent("c:myComponent", {}, "lightning", function(){ | |
$A.eventService.addHandler({ "event": "c:myEvent", "handler" : visualForceFunction}); | |
}); | |
}); | |
</script> | |
<script> | |
var visualForceFunction = function(event){ | |
var myEventData = event.getParam("data"); | |
console.log(myEventData); | |
}; | |
</script> | |
</apex:page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment