+ Start a Discussion
Antonio FerreroAntonio Ferrero 

Challenge Trailhead - Lightning

Hi, I have been trying the "Using expressions challenge" of the lightning module and when I check the challenge I receive the next message:

Challenge not yet complete... here's what's wrong: 
The component is not defining an attribute

And here is my component:
<aura:component implements="force:appHostable">
    <aura:attribute name="DayOfTheWeek" type="String" default="Monday" /> 
    <aura:if isTrue="{!v.DayOfTheWeek=='Monday'}">
    Today is {!v.DayOfTheWeek}
        .........
    </aura:if>
</aura:component>

So, basically I don´t know what the error message refers to.

Thanks in advance.
Best Answer chosen by Antonio Ferrero
sfdcdevsfdcdev
Try the challenge using a fresh org, see if the error still persists.

All Answers

sfdcdevsfdcdev
Try this:
 
<aura:component  implements="force:appHostable">
    <aura:attribute name="DayOfTheWeek" type="String"/>
	<aura:if isTrue="{!v.DayOfTheWeek == 'Monday'}">
        Today is {!v.DayOfTheWeek}
       <aura:set attribute="else">
           Today is not Monday!
       </aura:set>
    </aura:if>
</aura:component>

 
Antonio FerreroAntonio Ferrero
Thanks, but it keeps telling me the same:

Challenge not yet complete... here's what's wrong: 
The component is not defining an attribute
sfdcdevsfdcdev
Try the challenge using a fresh org, see if the error still persists.
This was selected as the best answer
Antonio FerreroAntonio Ferrero
Yes, in a new org it worked, thanks.
Sandeep BhanotSandeep Bhanot
Hi Antonio - I'm glad that you were able to complete the challenge in a fresh new Org! If you wouldn't mind, I would like to debug why your challenge didn't work in the previous Org though (so that other folks don't trip over something similar). Was that Org namespaced? You can reach me at sbhanot@salesforce.com and we continue the thread there if you'd like.
Hope you're enjoying your Trailhead experience and let us know how we can make it better.
Sandeep Bhanot
Antonio FerreroAntonio Ferrero
Ok, thanks.
Ryan DraperRyan Draper
Any update on this?  I'm getting the same behaviour but don't want to spin up a new org just to finish a Trailhead exercise.