You need to sign in to do that
Don't have an account?

Help with - Defining Component attributes
I cannot seem to pass this challenge and I have tried so many different ways.
Here is my code for .cmp and .app
If anyone could help that we be awesome,
TIA
Scott
Here is my code for .cmp and .app
<aura:component> <aura:attribute name="Street" type="String" /> <aura:attribute name="City" type="String" /> <aura:attribute name="State" type="String" /> <aura:attribute name="PostalCode" type="String" /> <div class="addressDetails"> <div class="street">Street: {!v.Street}</div> <div class="state">State: {!v.State}</div> <div class="city">City: {!v.City}</div> <div class="postalCode">ZipCode: {!v.PostalCode}</div> </div> </aura:component>and my .app
<aura:application > <h1>Starting the DisplayAddress component</h1> <c:DisplayAddress Street="22 north" City="Provo" State="ut" PostalCode="99900"/> </aura:application>
If anyone could help that we be awesome,
TIA
Scott
What error did you get when you tried to submit this? I don't see any issues with the component. I don't believe you need an application. The component alone should be fine. Here's what I used:
All Answers
What error did you get when you tried to submit this? I don't see any issues with the component. I don't believe you need an application. The component alone should be fine. Here's what I used:
Challenge not yet complete... here's what's wrong:
The component is not using any attributes
I dont know what i am doing wrong...
Regards,
Ghanshyam
The code works perfectly fine with me. Just create a Lightining Component and save it.
<aura:component implements="force:appHostable">
<aura:attribute name="Street" type="String" default="123 Street"/>
<aura:attribute name="City" type="String" default="Teaneck" />
<aura:attribute name="State" type="String" default="New Jersey" />
<aura:attribute name="PostalCode" type="String" default="07666"/>
{!v.Street}<br />
{!v.City}, {!v.State}<br />
{!v.PostalCode}
</aura:component>