Posts

Showing posts from July, 2017

Using Aura:Set with Lightning Components Extension

Image
When we think about Object Oriented Concepts, Inheritance is one thing where we can extract functionality from Super Class and in Lightning Components development aura:set serves with similar feature where we can assign values for the attributes of a Super Component from a Sub Component which extends a Super Component. Resource Link: Lightning Components Developer Guide Below is a simple implementation of having two components and using aura:set we will populate attributes of a base component using another component which will extend our base component. Component 1: This will be our base component which will display records Name and Id which are passed from Component 2 using Aura:Set AuraSet1.cmp <!--AuraSet1--> <aura:component extensible="true" > <!--Load LDS from static resource--> <ltng:require styles="/resource/SLDS/assets/styles/salesforce-lightning-design-system.css"/> <aura:attribute name="rc...

Salesforce Lightning Container Overview

Image
Earlier with Visualforce we have a way of exposing an external App using "iframe". Now with Lightning Component Development we have a similar functionality available with Lightning Container which hosts all external App content in an "iframe" which makes Lighting Container a powerful way of rendering external apps within our Lightning Components. In order to use external App within Lighting Container, we will just need to upload our App to a Static Resource and reference it under Lightning Container. Lightning Container in action: Lets go ahead and use a simple JavaScript App ( Source Link ) and save it under Static Resource and see how it is rendered when used in Lightning Container. Step 1: Copy paste below Code in a new text editor and save it as ".html" file. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Countries CRUD</title> <style> input[type='s...