Lightning: Value Providers

Lightning: Value Providers

a way to access data
The value providers for a component are v (view) and c (controller)

v --> component's attributes
enables access to the value of a component's attribute

c --> component's controller
enables you to wire up event handlers and actions for the component
Global Value Providers:
globalID - returns the unique global ID for a component.
generated runtime-unique ID of the component instance.
$Browser - returns information about the hardware and operating system of the browser
$ContentAsset - references images, style sheets, and JavaScript used as asset files
ex: <ltng:require styles="{!$ContentAsset.bookStyle}"/>
$Resource - reference images, style sheets, and JavaScript code you've uploaded in static resources.
$Label - accesses labels stored outside your code
ex: $A.get("$Label.namespace.labelName")
$Locale - returns information about the current user's preferred locale
$SObjectType - used for getting current user info, please help me in case you have any document for this.

Rajendar Bommidi
Salesforce Certified Platform Developer I and App Builder, Tech Mahindra

9177719594 | 9177719594 | | Skype: risha.9177719594


No comments:

Powered by Blogger.