Angular AOT compilation error \"cannot determine module for class Component''
- 阅读更多 关于 Angular AOT compilation error \"cannot determine module for class Component''
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an Angular (4.3.2) application on which I want to perform an AOT build. App was created using @angular/cli . I have two components scaffolded with ng generate and a module in which both are included as a declaration: import {PrivateComponent} from './private.component/private.component'; NgModule({ imports: [ // other imports PrivateRoutingModule ], declarations: [ ...some other components, PrivateComponent, AppTopBarComponent ] // other stuff }) export class PrivateModule {} Private component is also used in the module's routing: