Angular Compile Error NG6002
问题
项目启动后报 Angular Compile Error: NG6001/NG6002/NG6003: The class ‘AppComponent’ is listed in the declarations of the NgModule 'AppModule
和
ng2005 error
解决
// angular.json
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true, // <-- remove this line
...