• #32738
     shradha jain #651
    Forcetalks

    How to use static resources in Lightning Application in salesforce ?

    How to use static resources in Lightning Application in salesforce?

    #32739
    Forcetalks

    Hi Shradha,

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

    <aura:application>

    <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>
    </div>
    </div>

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

    </aura:application>

     

     

    #35169
    Salesforce | shariq shariq #935
    Forcetalks

    Hi,

    $Resource
    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.

    <aura:component>
    <!– Stand-alone static resources –>

    <!– Asset from an archive static resource –>


    </aura:component>

    Hopes this helps.

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

Please to reply to this topic.

CONTACT US

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

Sending

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

or    

Forgot your details?