It returns the Aura.Component instance(s) by its local ID.
If the Aura.Component local ID is unique, it returns the component and if there are multiple Aura.Component with the same local ID, it returns an array of the components.
Syntax: component.find("auraid");
component.get() :
It is associated with Component attributes and returns the referenced component attribute value.
({
handleSubmit : function(component, event, helper) {
//Find component and get value using component.find();
var fNameCmp = component.find("fName");
var lNameCmp = component.find("lName");
console.log('First Name : ' + fNameCmp.get("v.value"));
console.log('Last Name : ' + lNameCmp.get("v.value"));
//Get attribute value using component.get();
var fNameAttValue = component.get("v.firstName");
var lNameAttValue = component.get("v.lastName");
console.log('First Name : ' + fNameAttValue);
console.log('First Name : ' + lNameAttValue);
}
})
lightning:carousel component displays a series of images in a single container. Only one image is displayed at a time, and we can select other images by clicking the carousel indicators. We use lightning:carouselImage lightning component to display the image.
Example:
In below example I used static resource to display the images.
Here is the format “{!$Resource.staticResourceName+’image_path/img1.png’}” to display the image from static resource.