0

I copied this straight from Lightning Components Developer Guide and there is 404 error and I don't know why and how to fix it.

<aura:handler name="init" value="{!this}" action="{!c.init}" />
<div class="content">

    <lightning:icon iconName="action:approval" size="large" alternativeText="Indicates approval"/>

    <h2>Accounts With Contacts</h2>
    <ul class="table">
        <li class="header">
            <p>Account Name</p>
            <p>Billing State</p>
            <p>Phone</p>
            <p>Website</p>
        </li>
        <aura:iteration items="{!v.accounts}" var="account">
            <li class="rows">
                <p>{!account.Name}</p>
                <p>{!account.BillingState}</p>
                <p>{!account.Phone}</p>
                <p>{!account.Website}</p>
            </li>              
        </aura:iteration>                                           
    </ul>
</div>

2
  • everything need to be under <aura:component> or aura:application I don't see any of them in the code Jun 19, 2017 at 15:13
  • @AvijitChakraborty here is my full code but the error still occurs: pastebin.com/Shgh0RT6
    – Will
    Jun 19, 2017 at 15:23

1 Answer 1

1

extends="force:slds" need to be included.

<aura:application extends="force:slds">
        <div class="content">

        <lightning:icon iconName="action:approval" size="large" alternativeText="Indicates approval"/>

        <h2>Accounts With Contacts</h2>
        <ul class="table">
            <li class="header">
                <p>Account Name</p>
                <p>Billing State</p>
                <p>Phone</p>
                <p>Website</p>
            </li>
            <aura:iteration items="{!v.accounts}" var="account">
                <li class="rows">
                    <p>{!account.Name}</p>
                    <p>{!account.BillingState}</p>
                    <p>{!account.Phone}</p>
                    <p>{!account.Website}</p>
                </li>              
            </aura:iteration>                                           
        </ul>
    </div>
    </aura:application>
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .