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
Shruthi MN 32Shruthi MN 32 

Unable to save this code

<aura:component controller="ContactsController">
    <ltng:require styles="{!$Resource.SLDS090}"/>
    <head>
        <title>This will display contacts whose's birthday is today.</title>
    </head>
    <aura:attribute name="contacts" type="List" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <!-- <div class="container">-->

User-added image
    <div class="slds"> 

    <table class="slds-table slds-table--bordered slds-table--striped">
        <thead>
            <tr>
                <th scope="col"><span class="slds-truncate">Date</span></th>
                <th scope="col"><span class="slds-truncate">Contact Name</span></th>
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.contacts}" var="contact">
                <tr>
                    <td>{!contact.Birthdate}</td>
                    <td>{!contact.Name}</td>
                </tr>
            </aura:iteration>
        </tbody>
    </table>
        </div>
</aura:component>
VinayVinay (Salesforce Developers) 
Hi Shruthi,

Looks like you might be missing static resource which is not configured in your org.

Try to include static resource and you should be able to save.

Please review below Lightning Design System

https://www.lightningdesignsystem.com/downloads/

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar

 
Shruthi NarsiShruthi Narsi
Hi I have donloaded it but its still not getting displayed
whatsapp status in urduwhatsapp status in urdu
nice thanks for share
whatsapp status in urdu (https://urdu-status.com/)
funny status in urdu (https://urdu-status.com/funny-status-in-urdu)
islamic whatsapp status in urdu (https://urdu-status.com/islamic-whatsapp-status-in-urdu/)
sad status in urdu (https://urdu-status.com/sad-whatsapp-status-in-urdu/)
sindhi whatsapp status (https://urdu-status.com/sindhi-whatsapp-status/)
sachinarorasfsachinarorasf
Hi Shruthi,

I have gone through your problem.
 
Apex Controller: ContactsController.apx
public class ContactsController {
@AuraEnabled
    public static List<Contact> showContacts(){
        try{
            List<Contact> contactList = new List<Contact>();
            contactList =[Select Id,Birthdate,LastName,Name,FirstName from Contact limit 50000];
            if(contactList.size()>0){
                return contactList;
            }
        }catch(Exception ex){
            System.debug('error message'+ex.getMessage() +'Line Number'+ex.getLineNumber());
        }
        return null;
    } 
}



Component: ShowContactsCmp.cmp
<aura:component controller="ContactsController">
    <ltng:require styles="{!$Resource.SLDS090}"/>
    <head>
        <title>This will display contacts whose's birthday is today.</title>
    </head>
    <aura:attribute name="contacts" type="List" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <!-- <div class="container">-->


    <div class="slds"> 

    <table class="slds-table slds-table--bordered slds-table--striped">
        <thead>
            <tr>
                <th scope="col"><span class="slds-truncate">Date</span></th>
                <th scope="col"><span class="slds-truncate">Contact Name</span></th>
            </tr>
        </thead>
        <tbody>
            <aura:iteration items="{!v.contacts}" var="contact">
                <tr>
                    <td>{!contact.Birthdate}</td>
                    <td>{!contact.Name}</td>
                </tr>
            </aura:iteration>
        </tbody>
    </table>
        </div>
</aura:component>

Controller: ShowContactsCmpController
({
    doInit : function(c,e,h) {
        h.doInit_Helper(c,e,h);
    }
    
})

Heleper: ShowContactsCmpHelper
({
    doInit_Helper : function(c, e, h) {
        var action = c.get("c.showContacts");
        action.setCallback(this,function(response){
            var state = response.getState();
            if (state === "SUCCESS") {
                let storedResponse = response.getReturnValue();
                if(!$A.util.isEmpty(storedResponse) && storedResponse != undefined && storedResponse != null){
                    c.set('v.contacts',storedResponse);
                }
            }
        });
        $A.enqueueAction(action);
    }
})

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Sachin Arora