作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
当我尝试在 Angular cli 中创建组件时,它向我显示此错误。我该如何摆脱它?
Error: More than one module matches. Use skip-import option to skip importing the component into the closest module.
我使用的是 angular cli 版本:1.4.1
最佳答案
使用 --module 参数指定模块。例如,如果主模块是 app.module.ts,运行这个:
ng g c new-component --module app
或者如果你在其他目录下
ng g c component-name --module ../
关于angular - 错误 : More than one module matches. 使用 skip-import 选项跳过将组件导入最近的模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46174863/
我是一名优秀的程序员,十分优秀!