Implementing interfaces in Lightning Components

A comma-separated list of interfaces that the component implements. An interface defines where Lightning Components are available. The following some of the available interfaces and their importance:

Interface Description 
force:appHostable

Creates a component for use as a navigation element in Lightning Experience or Salesforce mobile apps.

forceCommunity:availableForAllPageTypes

Creates a component that's available for drag and drop in the Community Builder.

flexipage:availableForAllPageTypes

Creates a component for use in Lightning pages or the Lightning App Builder.

flexipage:availableForRecordHome

Creates a component for use on a record Homepage in Lightning Experience.

force:LightningQuickAction

Creates a component that can be used with a Lightning quick action.

Lightning:actionOverride

Overrides a standard action in Lightning Experience.

 

The syntax with multiple interfaces for the component is as follows:

<aura:component access="global" description="Youtube Search Component" implements="flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:appHostable">
<!-- Optional coponent attributes here -->
<!-- Optional HTML markup -->
</aura:component>
You can also define your own interface using aura:interface. To know more refer the docs here https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/oo_interfaces.htm.

In Chapter 1Introduction to the Lightning Component Framework, we briefly touched upon the Lightning Design System. The Lightning Design System provides pre-defined patterns to build a UI without having to reinvent or code much. However, the Lightning Design System alone is not sufficient to attain a working application. That requires the developer to use JavaScript code to add client-side interactivity. Salesforce has simplified this by providing some out-of-the-box components with the Lightning namespace. Your goal, as a developer, should be to use these components as much as possible. They simplify the application build by having to code lots of JavaScript. However, note that, if you need functionality, that's not provided by out-of-the-box components; you could always custom code the entire markup.

To explore the Lightning Component documentation in your Salesforce environment, visit https://<myDomain>.Lightning.force.com/, component reference/suite.app?page=home. Note that, here, myDomain is your Salesforce custom domain. The document is also available on the Salesforce developer website at https://developer.Salesforce.com/docs/component-library/.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.85.221