0

I am trying to save the below Aura Component but getting error. Code is -

<aura:component implements="flexipage:availableForAllPageTypes" access="global" controller="ComponentController">
    <aura:attribute name="firstName" type="String" value="" default="Mr.Jones" />
    Hello {!v.firstName}!
</aura:component>

but getting the below error when I am trying to save this-

Field_Integrity_Exception
Failed to save FirstComponent.cmp: 0Ad7F000001ZB2U:3,82: Invalid attribute "value": Source
  • Value is an attribute for Visualforce, not Lightning. – sfdcfox Sep 20 '18 at 11:36
5

aura:attribute dosen't have attribute named value. Remove it

<aura:component implements="flexipage:availableForAllPageTypes" access="global" controller="ComponentController">
    <aura:attribute name="firstName" type="String" default="Mr.Jones" />
    Hello {!v.firstName}!
</aura:component>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.