【发布时间】:2018-01-04 20:11:40
【问题描述】:
我有以下目录结构
我想创建一个新页面,比如说一个关于页面。 我想把它放在 src/app/page/about/*
所以我试试:
ng generate component pages/about
但我收到此错误:
Error: More than one module matches. Use skip-import option to skip importing the component into the closest module.
More than one module matches. Use skip-import option to skip importing the component into the closest module.
使用页面来存储我的单独页面是个好主意吗? 如何使用 angular-cli 在子目录中生成组件?
【问题讨论】:
-
显然,我可以在生成它们后手动移动它们,但如果能够跳过该手动步骤会很好
标签: angular-cli angular5 ng-generate