• Tomislav Strelar
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hey,

Thought I had understood all this fine but cant get the challenge to pass. Im going slowl mad and have probably made a dumb error. 

What am I doing wrong, or is the challenge broken? Any help much appreciated. 
The error I get is
Challenge Not yet complete... here's what's wrong: 
The campingListItem JavaScript controller isn't setting the 'item' attribute correctly.
My component
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true" />
    <p>Name:
        <ui:outputText value="{!v.item.Name}"/>
    </p>
    <p>Price:
        <ui:outputCurrency value="{!v.item.Price__c}"/>
    </p>
    <p>Date:
        <ui:outputNumber value="{!v.item.Quantity__c}"/>
    </p>
    <p>Packed?:
        <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    </p>
    <ui:button label="Packed!" press="{!c.packItem}" />
</aura:component>
My controller
({
	packItem : function(component, event, helper) {
        component.set("v.item.Packed__c", true);
        //console.log( JSON.stringify("v.item"));
        event.getSource().set("v.disabled" ,true);
	}
})