Use <aura:set> in the markup of a sub component to set the value of an inherited attribute.
Let’s look at an example. Here is the c:setTagSuper component.
<aura:component extensible=”true”>
<aura:attribute name=”address1″ type=”String” />
setTagSuper address1: {!v.address1}<br/>
</aura:component>
c:setTagSuper outputs:
setTagSuper address1:
The address1 attribute doesn’t output any value yet as it hasn’t been set.
Here is the c:setTagSub component that extends c:setTagSuper.
<aura:component extends=”c:setTagSuper”>
<aura:set attribute=”address1″ value=”808 State St” />
</aura:component>
c:setTagSub outputs:
setTagSuper address1: 808 State St