Code By Code – Lightning Framework – Chapter 5 – Standalone Lightning App

Code By Code – Lightning Framework – Chapter 5 – Standalone Lightning App

In this chapter, we will display our CarSearchForm.cmp aura component within a standalone lightning app.

The standalone lightning app has a custom URL. These can be hosted and run using the URL directly. Standalone apps file has .app extension. You can use aura components inside standalone lightning apps.
Using standalone lightning app is mandatory in some scenarios like:
1. Using lightning out to host aura component outside Salesforce ecosystem.
2. Using aura component within a visualforce page.

To create a standalone lightning app, open developer console and navigate to File -> New -> Lightning Application. Below is the application code: https://gist.github.com/dd6b6d5dbe61f32bc70abfaf3ddd884f

The application code is pretty simple.
– Beginning tag is mandatory and specifies that it is an application file.
– It also extends force:slds which is used to bring SLDS stylesheet to your lightning application.
– To use your component within a application, you need to use the format . Here in our case namespace is “c” and component name is “CarSearchForm”.

This only covers basics of lightning/aura application. Read more about aura application here.

Lightning Component Development Day3 - App, Attributes, Looping, Conditional Markup, Handling Events

Standalone Lightning App

Manish Choudhari

I am a certified Salesforce Application & System Architect and Developer working on Salesforce Technology since 2014. Currently, I have 14 Salesforce certifications along with OCPJP (Oracle Certified Profession JavaSE6 Programmer) working in Salesforce.com Hyderabad as a Technical Engineer. Writing technical blogs, learning new technologies and frameworks and sharing knowledge is my hobby.

Leave a Reply

Close Menu