function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Anita 8Anita 8 

How to add icon from zip static resource in to lightning component ???

<div class="slds" style="margin-top:10px;margin-left:10px;"> 
<ltng:require styles="/resource/icons/assets/styles/salesforce-lightning-design-system-ltng.css" /> 
<span class="slds-icon__container slds-icon-standard-account">            <c:svgclass="sldsicon"xlinkHref="/resource/icons/assets/icons/standardsprite/svg/symbols.svg#account" /> 
<span class="slds-assistive-text">Account Icon</span> 

I try to do like this , but still can not show icon . 
Please , help me .
Suman Kundu 1Suman Kundu 1
Hi Anita,

To get a URL for your file under static resource, you may use URLFOR method in tag attribute like below:
 <ltng:require styles="{!URLFOR($Resource.STATIC_RESOURCE_API_NAME, '/assets/styles/salesforce-lightning-design-system-ltng.css')}" />

I dont know the exact path under your zip file; so please change the 2nd parameter if required.
Anita 8Anita 8
Hi Suman

Thanks you for reply !!!!