You need to sign in to do that
Don't have an account?
aura:set attribute="action" Not working
<lightning:card footer="{!con.Email}" title="{!con.LastName}" iconName="action:add_contact">
<aura:set attribute="action">
<lightning:Button Label="View Details" Variant="brand"/>
</aura:set>
<p class="slds-p-horizontal-small">
{!con.FirstName} {!con.LastName} <br/>
{!con.Phone}
</p>
</lightning:card>
For the Above coding i am getting an Error:
ContactList.cmp: The attribute "action" was not found on the COMPONENT markup://lightning:card: Source.
anyone can help how to solve this.
<aura:set attribute="action">
<lightning:Button Label="View Details" Variant="brand"/>
</aura:set>
<p class="slds-p-horizontal-small">
{!con.FirstName} {!con.LastName} <br/>
{!con.Phone}
</p>
</lightning:card>
For the Above coding i am getting an Error:
ContactList.cmp: The attribute "action" was not found on the COMPONENT markup://lightning:card: Source.
anyone can help how to solve this.
Please define the <aura:set attribute="action"/> above the lightning:card.
<aura:set> is used to set the value of an attribute inherited from a parent component, event, or to set the value of the attribute of a component reference.
Just like this:-
<aura:set attribute="action"></aura:set>
<lightning:card footer="{!con.Email}" title="{!con.LastName}" iconName="action:add_contact">
<lightning:Button Label="View Details" Variant="brand"/>
<p class="slds-p-horizontal-small">
{!con.FirstName} {!con.LastName} <br/>
{!con.Phone}
</p>
</lightning:card>
Please follow the link below for the solution to your question:
https://www.forcetalks.com/blog/how-to-use-auraset-in-salesforce-lightning/
Hope this explanation will resolve your query. Mark, it as the best answer if you find it helpful.
Thanks
Akshay
All Answers
Please define the <aura:set attribute="action"/> above the lightning:card.
<aura:set> is used to set the value of an attribute inherited from a parent component, event, or to set the value of the attribute of a component reference.
Just like this:-
<aura:set attribute="action"></aura:set>
<lightning:card footer="{!con.Email}" title="{!con.LastName}" iconName="action:add_contact">
<lightning:Button Label="View Details" Variant="brand"/>
<p class="slds-p-horizontal-small">
{!con.FirstName} {!con.LastName} <br/>
{!con.Phone}
</p>
</lightning:card>
Please follow the link below for the solution to your question:
https://www.forcetalks.com/blog/how-to-use-auraset-in-salesforce-lightning/
Hope this explanation will resolve your query. Mark, it as the best answer if you find it helpful.
Thanks
Akshay
Thank you for your resolution.