anusha(salesforce developer)

Thursday, 11 May 2017

Adding lightning application in vf page

<aura:application access="GLOBAL" extends="ltng:outApp"> 
    <aura:dependency resource="ui:button"/>
</aura:application>

VF Page :

<apex:page>
    <apex:includeLightning />

    <div id="lightning" />

    <script>
        $Lightning.use("c:app15", function() {
        $Lightning.createComponent("ui:button",{ label : "Press Me!" },
                                   "lightning",function(cmp) {});
        });
    </script>
</apex:page>