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

Kahriq Chatmon
Kahriq Chatmon
8,694 Points

order of declarations

In the Nesting Components video at 8:57, Andrew explains that he placed entry.component above entry-list.component in the declarations array like this:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { EntryListComponent, EntryComponent } from './entries';

@NgModule({
    imports: [BrowserModule],
    declarations: [
        AppComponent,
        EntryComponent,
        EntryListComponent
    ],
    bootstrap: [AppComponent]
}) 
export class AppModule {

}

...because you should "always put your child components first". If that's the case, why isn't AppComponent at the very bottom since that's the root of the entire page?