+ Start a Discussion
Yan KuangYan Kuang 

For Developer Intermediate > Lightning Components Basics > Attributes and Expressions Challenge Issue

For Developer Intermediate > Lightning Components Basics > Attributes and Expressions challenge, even though it verified, but page is not displaying correctly.

It gave the following error when trying the run the page.

This page has an error. You might just need to refresh it.
Aura.loadComponent(): Failed to initialize application.
An internal server error has occurred
Error ID: 1877814438-103028 (-1501584897)

If I remove the required="true" from the aura:attribute it loads but it doesn't load any data.
SandhyaSandhya (Salesforce Developers) 
Hi Yan Kuang,

Please check if you have enabled namespace in your org as this challenge will not be passed if you have enabled.

Below is the code which worked for me.
<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"/>
    <ui:outputText value = "{!v.item.Name}"/>   
    <ui:outputCheckbox value="{!v.item.Packed__c}"/>
    <ui:outputCurrency value="{!v.item.Price__c}"/>       
    <ui:outputNumber value="{!v.item.Quantity__c}"/>   

Please refer below link for a similar issue.

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution.
Thanks and Regards

Yan KuangYan Kuang
Hi Sandhya,

Thank you for the response, I think I am able to get it working now.

Platinum TradePlatinum Trade
This is how it should go on

<aura:component >
    <aura:attribute name="item" type="Camping_Item__c" required="true"
 default="{Name:'ABC', Price__c:100, Quantity__c:1, Packed__c:false}"
        <!-- <ui:outputText value="{!v.item.Name}"/> -->
        <lightning:input type="text" name="output"  value="{!v.item.Name}" />
    <!-- <ui:outputCurrency value="{!v.Camping_Item.Price__c}"/> -->
    <lightning:formattedNumber value="{!v.item.Price__c}"  style="currency"/>
        <!-- <ui:outputNumber value="{!v.Camping_Item.Quantity__c}"/>-->
        <lightning:formattedNumber value="{!v.item.Quantity__c}"/>
        <!-- <ui:outputCheckbox value="{!v.Camping_Item.Packed__c}"/> -->
        <lightning:input 	type="toggle"