Angular Error: Is it missing an @NgModule annotation?



Fehlermeldung in ng serve:

Is it missing an @NgModule annotation?




In app.module.ts muss die neue Componente nicht in imports, sondern in declarations eingetragen werden




VC Code Terminal nach Compiled successfully

Error: src/app/components/spinner2/spinner2.component.ts:9:14 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.


    Is it missing an @NgModule annotation?


    9 export class Spinner2Component implements OnInit {






import { BrowserModule } from '@angular/platform-browser';

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


import { Spinner2Component } from "../app/components/spinner2/spinner2.component";


import { AppComponent } from './app.component';



  declarations: [




  imports: [




  providers: [],

  bootstrap: [AppComponent]


export class AppModule{ }