I am working through one of the Salesforce Lightning modules.
I completed the challenge (passed it). The challenge was about creating the lightning component.
But now when I incorporate the created component into a blank lightning app nothing works.
Here are my lightning component bundle parts and the app.
campingListItem.cmp
:
<aura:component >
<aura:attribute name="item" type="Camping_Item__c" required="true" />
<p>{!v.item.name}</p>
<p>{!'Name: ' + v.item.name}</p>
<lightning:formattedNumber value="{!v.item.Price__c}" style="currency"/>
<lightning:formattedNumber value="{!v.item.Quantity__c}" style="currency"/>
<lightning:input type="toggle"
label="Packed?"
name="packed"
checked="{!v.item.packed__C}" />
<lightning:button label="Packed!" onclick="{!c.packItem}"/>
</aura:component>
campingListItemController.js
:
({
packItem : function(component, event, helper) {
var item = component.get("v.item");
item.packed__C = true;
var button = event.getSource();
button.disabled = true;
}
})
appForTheVerification.app
:
<aura:application >
<c:campingListItem/>
</aura:application>
All the files above were developed in the developer console. So, now with the appForTheVerification.app
tab being open I am clicking to preview the created app and component respectively.
The window of my browser opens and here is what I see:
And the loading is stuck there forever. So, I can not see the component I created.
Here are the console errors from the browser which opened the preview:
aura_prod.js:805 Uncaught Aura.loadComponent(): Failed to initialize application.
An internal server error has occurred
Error ID: 942931036-81876 (1552973958)
throws at https://brave-bear-114723-dev-ed.lightning.force.com/auraFW/javascript/1bO4dJePbDnoI-_VdhdsEQ/aura_prod.js:38:15 $y
a @ aura_prod.js:805
ui-icons_222222_256x240.png:1 Failed to load resource: the server responded with a status of 404 (Not Found)
What am I doing wrong?
I may tell for sure that the problem is not in the some ui-icon
GET request. Since I got the same error while completing my another challenge and still everything continues to work just fine.