Creating a Lightning dependency application

The first step for using Lightning Out is creating a dependency application. A dependent Lightning Application extends from ltng:outApp. Note that extending from ltng:outApp also involves incorporating Salesforce Lightning design systems. If you want your Lightning Components not to have design systems imported in Lightning Out, then you can use ltng:outAppUnstyled.

The following is a code snippet for the dependency application that exposes the youtubesearch component:

<aura:application access="GLOBAL" extends="ltng:outApp">     <aura:dependency resource="youtubesearch"/></aura:application>

The <aura:dependency> tag enables you to declare dependencies. If you are using any event, such as force:navigateToURL ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.