function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Greg DiercksGreg Diercks 

Incorrect Code in "Defining Component Attributes" module?

This code will not compile in the Dev. Console:
    Observe!  Components within components!


    <docsample:helloAttributes whom="component composition"/>

This code will compile:

    Observe!  Components within components!


    <c:helloAttributes whom="component composition"/>

The name space is wrong for the two nested components.  (Unless I am completely hallucinating!  And I might be - it's Friday!)
SonamSonam (Salesforce Developers) 
It seems to be working for me..

if you see the section Component Composition on the link:

It asks to create two local components and these both will have the namespace set in the org. This way, when we need to access them in other components, we need to use the namespace thus we see    <docsample:helloHTML/>
Dave Durant 1Dave Durant 1

Me too, Greg. The article doesn't say anything about setting your org to the docsample namespace..

Chrisdev ToewsChrisdev Toews
I'm trying to work through this.
on page 50 of this doc:
I found where you can set your namespace. but you once you set it, it never changes. I'm disinclined to set my namespace to "docsample".
I'm going with Greg on this one.
Thanks Greg,

I also found that I can't preview the helloHTML.cmp component. I had to make an application with the following code:
<aura:application >
If there is some other way to preview the helloHTML component in that module, I'd like to know. I've liked all the other Trailhead modules, but this one seems off.

Chris Toews
Ryan LambertRyan Lambert
So glad I'm not the only one who found this module a little "incomplete" in terms of the steps to implement.

@Chrisdev Toews, one other way to "preview" is to add the implements="force:appHostable" to your aura:component tag and then you can create a Lightning Tab for the component and view it in the UI.
Steve J CookSteve J Cook
I'm glad also. This module needs to be reworked a bit. I spent a good amount of time trying to understand what I wasn't "getting" as far as concepts especially with the "Output" for helloHTML.cmp when no app had been created  yet and no way to "preview" it.