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
1
  • Value is an attribute for Visualforce, not Lightning.
    – sfdcfox
    Commented Sep 20, 2018 at 11:36

1 Answer 1

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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .