/src/app
/src/app/app.module.ts
catalog/single/configurator/[new component here]
ng g c catalog/single/configurator/details-popout --module AppModule
指定的模块不存在
ng g c catalog/single/configurator/details-popout --module /app.module
无效的规则结果:Function()。
ng g c catalog/single/configurator/details-popout --module app
无效的规则结果:Function()。
如何使用Angular CLI添加组件details-popout
?
Angular CLI: 6.0.8
Node: 9.2.0
OS: darwin x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.7.5
@angular/cli 6.0.8
@angular/fire 5.0.0
@angular/pwa 0.6.8
@ngtools/webpack 6.0.8
@schematics/angular 0.7.5
@schematics/update 0.6.8
rxjs 6.3.2
typescript 2.7.2
webpack 4.8.3
答案 0 :(得分:1)
ng g c catalog/single/configurator/details-popout --module app.module.ts
允许指定声明模块的文件名(例如
app.module.ts
。
真正的问题是:
确保您的@angular/cli
软件包已更新为最新的运行版本:
npm install -g @angular/cli