+ Start a Discussion
Greg DiercksGreg Diercks 

"Introduction to Attributes" module, more code that doesn't compile.

First I created the component facetHeader (as per the script in the module):

<aura:component>
    <aura:attribute name="header" type="Aura.Component[]"/>

    <div>
        <span class="header">{!v.header}</span><br/>
        <span class="body">{!v.body}</span>
    </div>
</aura:component>

It compiles fine.

I then try to create the helloFacets component, copying the code directly from the module:

<aura:component>
    See how we set the header facet.<br/>

    <auradocs:facetHeader>

        Nice body!

        <aura:set attribute="header">
            Hello Header!
        </aura:set>
    </auradocs:facetHeader>

</aura:component>


When I save it, I get this message:

User-added image

The code provided in the module doesn't compile.

Will some one please post the correct code?  

 
Greg DiercksGreg Diercks
The error is the same as my previous question - the wrong name space is used.  The code should be:

<aura:component>
    See how we set the header facet.<br/>

    <c:facetHeader>

        Nice body!

        <aura:set attribute="header">
            Hello Header! 
        </aura:set>
    </c:facetHeader>

</aura:component>