• #32738
     shradha jain #651

    How to use static resources in Lightning Application in salesforce ?

    How to use static resources in Lightning Application in salesforce?


    Hi Shradha,

    To use static resources in Lightning Application in salesforce, implement the application as follows:


    <link href=’/resource/bootstrap/’ rel=”stylesheet”/>

    <div class=”navbar navbar-default navbar-static-top” role=”navigation”>
    <div class=”container”>
    <div class=”navbar-header”>
    <a href=”#” class=”navbar-brand”>Lightning Contacts</a>

    <div class=”container”>
    <div class=”row”>
    <div class=”col-sm-12″>
    Contact list goes here




    Salesforce | shariq shariq #935


    The $Resource global value provider lets you reference images, style sheets, and JavaScript code you’ve uploaded in static resources.
    Using $Resource lets you reference assets by name, without worrying about the gory details of URLs or file paths. You can use $Resource in Lightning components markup and within JavaScript controller and helper code.

    <!– Stand-alone static resources –>

    <!– Asset from an archive static resource –>


    Hopes this helps.

Viewing 3 posts - 1 through 3 (of 3 total)

Please to reply to this topic.


We're not around right now. But you can send us an email and we'll get back to you, asap.


About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2020 Forcetalks. All Right Reserved.

Log in with your credentials


Forgot your details?