Angular: NG8001: 'app-item' is not a known element — verify that it is included in the component's imports
The template uses a tag Angular does not recognise as a component — it was never imported (standalone) or declared/exported (NgModule), or it is a custom element without a schema.
is not a known element'router-outlet' is not a known elementIf 'app-item' is an Angular component, then verify that it is part of this module'mat-form-field' is not a known element Meaning
Angular only compiles tags that map to a component, a known HTML element or a custom element that you allow. With standalone components, add the component to the imports array of the component that uses it. With NgModules, declare it in a module and export it from the module that owns it. <router-outlet> needs RouterOutlet, Material tags need their module.
Common causes
- Standalone component not added to the
importsarray of the parent - Component declared in one NgModule but not exported to the module that uses it
- Typo in the selector, or the selector prefix differs (
app-vsmy-) - Angular Material / third-party component module not imported (for example
RouterOutlet,MatButtonModule) - A Web Component used without
CUSTOM_ELEMENTS_SCHEMA
⚡ Quick fix
- Add the component, directive or module to the
importsof the component that uses the tag - In NgModules add it to
declarationsand toexportsof the owning module - For real Web Components add
schemas: [CUSTOM_ELEMENTS_SCHEMA]
Detailed fix by platform
Angular
- Standalone:
imports: [ItemComponent, RouterOutlet]in the@Componentdecorator - NgModule: put
ItemComponentindeclarationsandexports, then import that module where the tag is used
Angular CLI
- Generate components with the CLI so selectors and exports are wired up:
ng generate component item
Code examples
Import what the template uses
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { ItemComponent } from './item.component';
@Component({
selector: 'app-root',
standalone: true,
imports: [RouterOutlet, ItemComponent], // every tag used in the template must be listed
template: `<app-item></app-item><router-outlet></router-outlet>`,
})
export class AppComponent {}How to diagnose
- Tag — Exact tag and selector spelling?
- Scope — Is the component imported (standalone) or declared and exported (module)?
- Version — Standalone or NgModule project?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- mat-form-field must contain a MatFormFieldControl Angular Material: Error: mat-form-field must contain a MatFormFieldControl
- NG02200 Angular: NG02200: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays
- NG0300 Angular: NG0300: Multiple components match node with tagname app-x: A and B
Most viewed in Angular
- NG0100 Angular: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked
- NullInjectorError: No provider for HttpClient! Angular: NullInjectorError: No provider for HttpClient! — provideHttpClient() missing
- Cannot GET /route on refresh Angular (production): Cannot GET /dashboard — 404 when refreshing or opening a deep link
Other ways to find it
Where this error sits
Origin: On your device. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026