在使用Angular4开发中遇到的问题

F:\samples>ng g c add-sample

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.

解决办法:

ng g c add-sample  --module=app

原因:

项目中有多个模块(包含appModule , routingModule等),

所以需要选中要配置的app模块

 转载自:https://blog.csdn.net/MengYan_/article/details/79790962

posted @ 2018-06-12 17:27  ft039x  阅读(704)  评论(0编辑  收藏  举报
TOP