Skip to content

Instantly share code, notes, and snippets.

@kiran-machhewar
Created October 9, 2016 15:27
Show Gist options
  • Save kiran-machhewar/dd67c942c7e4e42ce132bcebbe34cade to your computer and use it in GitHub Desktop.
Save kiran-machhewar/dd67c942c7e4e42ce132bcebbe34cade to your computer and use it in GitHub Desktop.
<aura:component controller="LightningOutExampleController">
<aura:attribute name="contacts" type="Contact[]" default="[]"></aura:attribute>
<aura:handler name="init" value="{!this}" action="{!c.initialize}" />
<aura:handler event="c:lightningAppEvent" action="{!c.lightningAppEventHandler}"/>
<aura:registerEvent name="lightningAppExternalEvent" type="c:lightningAppExternalEvent" />
<aura:iteration items="{!v.contacts}" var="contact">
<h1>{!contact.Name}</h1><br/>
</aura:iteration>
<ui:button label="Call Visualforce code from Lightning" press="{!c.callExternalFunction}"/>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment