You need to sign in to do that
Don't have an account?
VS0184
Lightning:card markup Error
For challenge "Create a Lightning Component", I am getting the error listed below. I was able to get through all of the other modules except this one. What am I missing?
Error: Challenge Not yet complete... here's what's wrong: The component does not contain the correct lightning:card markup.
MyContactList.cmp
Thanks in advance!
Error: Challenge Not yet complete... here's what's wrong: The component does not contain the correct lightning:card markup.
MyContactList.cmp
<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:datatable data="{! v.Contacts }" columns="{! v.Columns }" hideCheckboxColumn="true"/> </lightning:card> <aura:handler name="init" value="{!this}" action="{!c.myAction}" /> </aura:component>MyContactListControllers.js
({ myAction : function(component, event, helper) { component.set("v.Columns", [ {label:"First Name", fieldName:"FirstName", type:"text"}, {label:"Last Name", fieldName:"LastName", type:"text"}, {label:"Phone", fieldName:"Phone", type:"phone"} ]); var action = component.get("c.getContacts"); action.setParams({ recordId: component.get("v.recordId") }); action.setCallback(this, function(data) { component.set("v.Contacts", data.getReturnValue()); }); $A.enqueueAction(action); } })
Thanks in advance!
have you solved the issue? I have same one, would like to know how could it be fixed.
Thanks!