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

Mark Jones
seal-mask
PLUS
.a{fill-rule:evenodd;}techdegree seal-36
Mark Jones
Full Stack JavaScript Techdegree Graduate 29,362 Points

I'm getting an error for <app-entry-list></app-entry-list>

Doctype must be declared first. [Angular] 'app-entry-list' is not a known element:

  1. If 'app-entry-list' is an Angular component, then verify that it is part of this module.
  2. If 'app-entry-list' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

1 Answer

Neil McPartlin
Neil McPartlin
14,662 Points

Hi Mark. Take a look inside your entry-list.component.ts file and see how it compares with this...

entry-list.component.ts

import {Component} from '@angular/core';

@Component({
    selector: 'app-entry-list',
    templateUrl: 'entry-list.component.html',
    styleUrls: ['entry-list.component.css']
})

export class EntryListComponent {

}

...this is where app-entry-list gets defined.