You need to sign in to do that
Don't have an account?
Janet Cutler
Error on Trailhead Create a lightning component
I am trying to complete the Create a lightning component on Trailhead, I keep getting this error I cannot understand what I have missed. Can anyone help?
Failed to save MyContactList.cmp: 0Ad7F000000f3e5:15,18: ParseError at [row,col]:[16,18] Message: XML document structures must start and end within the same entity.: Source
This is my code as per the module
<aura:component controller="MyContactListController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="Account" type="Account" />
<aura:attribute name="Contacts" type="Contact" />
<aura:attribute name="Columns" type="List" />
<force:recordData aura:id="accountRecord"
recordId="{!v.recordId}"
targetFields="{!v.Account}"
layoutType="FULL"
/>
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
<!-- Contact list goes here -->
</lightning:card>
Failed to save MyContactList.cmp: 0Ad7F000000f3e5:15,18: ParseError at [row,col]:[16,18] Message: XML document structures must start and end within the same entity.: Source
This is my code as per the module
<aura:component controller="MyContactListController" implements="flexipage:availableForRecordHome,force:hasRecordId" access="global" >
<aura:attribute name="recordId" type="Id" />
<aura:attribute name="Account" type="Account" />
<aura:attribute name="Contacts" type="Contact" />
<aura:attribute name="Columns" type="List" />
<force:recordData aura:id="accountRecord"
recordId="{!v.recordId}"
targetFields="{!v.Account}"
layoutType="FULL"
/>
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
<!-- Contact list goes here -->
</lightning:card>
There's some good info on how to use the "Standard Contorller" in Lightning :)