Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Angular Basics Angular Components Nesting Components

bryonlarrance
bryonlarrance
16,414 Points

Entry-List Component Children?

It is mentioned in the video that entry.component is a child of entry-list component. Aren't they siblings? Did I miss something??

2 Answers

It is in the HTML files where entry becomes a child of entry-list and that is due to the location of the <app-entry> element. Notice that the selector declared in the entry.component.ts file is "app-entry". The instructor nests the <app-entry> tag in the entry-list.component.html file, which renders in the <app-entry-list> element found in the app.component.html file. The browser basically is told to render <app-entry> within the <app-entry-list> element which makes it its child.

It took a minute for me to understand what was going on because the instructor doesn't focus on that concept very closely.

Lokesh Sanapalli
Lokesh Sanapalli
1,242 Points

exactly same doubt... I felt like he is just reading through the transcript, didn't clearly understood what he is saying...