错误:模块'AppModule'导入了意外的指令'AppComponent'。请添加一个@NgModule批注

时间:2019-03-04 15:34:13

标签: angular npm console components

这是我当前的问题,因为我想将一个显示来自外部服务器的数据的Kendo-UI-Grid添加到Kendo-UI的Validator-Form中,该表单与(Internal-Data)-网格。

我正在Visual Studio Studio Code上使用Kendo-UI使用NPM和Angular 7。

通过这种方式,我在Editor或CLI中没有错误,但是localhost网站位于loading-loop-staate中,并且在Firefox控制台中收到了此错误。

enter image description here

我不知道该怎么办,因为我的编辑器没有显示任何错误,如前所述。

enter image description here

导入NgModule但不将其包含在导入中对于编辑器是可行的,但是我的控制台仍然显示与图1相同的错误。

enter image description here

如果我删除了NgModule,则编辑器将使用错误的模块:

enter image description here

我在StackOverflow上尝试了其他解决方案,但没有一个对我有用。
正如上半部分所说:“从导入中删除NgModule”。
下半部分说:“在导入中包含NgModule”。

0 个答案:

没有答案