在使用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

原文地址:https://www.cnblogs.com/ft039x/p/9174204.html