• Subbu Davala
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Module
Lightning components -> Create a lightning component

I"m just using the same code they've given in trail head module.

Error:-
Step not yet complete... here's what's wrong:
The component does not contain the correct lightning:card markup.


code used: (provided in trailhead):
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
    <!-- Contact list goes here -->
    
    <lightning:datatable data="{! v.Contacts }" columns="{! v.Columns }" keyField="Id" hideCheckboxColumn="true"/>

    
</lightning:card>
Module
Lightning components -> Create a lightning component

I"m just using the same code they've given in trail head module.

Error:-
Step not yet complete... here's what's wrong:
The component does not contain the correct lightning:card markup.


code used: (provided in trailhead):
<lightning:card iconName="standard:contact" title="{! 'Contact List for ' + v.Account.Name}">
    <!-- Contact list goes here -->
    
    <lightning:datatable data="{! v.Contacts }" columns="{! v.Columns }" keyField="Id" hideCheckboxColumn="true"/>

    
</lightning:card>
<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}">
    <ul>
    <lightning:datatable data="{! v.Contacts }" columns="{! v.Columns }" hideCheckboxColumn="true"/></ul> 
     </lightning:card>
    <aura:handler name="init" value="{!this}" action="{!c.myAction}" />
</aura:component>