首页 > 其他 > 详细

Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

时间:2019-05-16 16:03:13      阅读:611      评论:0      收藏:0      [点我收藏+]

使用  ng generate component sticky-table  命令新建一个组件时报错:Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

 

原因是无法找到上级模块的 module(module 的名字不是 app.module.ts);

 

解决办法:指定 module 即可, ng generate component sticky-table --module=main ,我这里 module 的名字是 main.ts。

 

Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

原文:https://www.cnblogs.com/hiwynn/p/10875804.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!