Use the <aura:attribute> tag to add an attribute to the component or app. Let’s look at the following sample, helloAttributes.app:
<aura:application> <aura:attribute name="whom" type="String" default="world"/> Hello {!v.whom}! </aura:application>
All attributes have a name and a type. Attributes may be marked as required by specifying required="true", and may also specify a default value.
In this case we've got an attribute named whom of type String. If no value is specified, it defaults to "world".
Though not a strict requirement, <aura:attribute> tags are usually the first things listed in a component’s markup, as it provides an easy way to read the component's shape at a glance.
An attribute name must follow these naming rules:
helloAttributes.app contains an expression, {!v.whom}, which is responsible for the component's dynamic output.
Expressions are case sensitive. For example, if you have a custom field myNamespace__Amount__c, you must refer to it as {!v.myObject.myNamespace__Amount__c}.