Kendo UI中模块“ AppModule”导入的意外值“ DecoratorFactory”

时间:2019-03-01 11:17:56

标签: javascript angular typescript kendo-ui

我正在尝试启动Angular / Kendo UI项目,但是浏览器在控制台中给我以下错误:

Error: Unexpected value 'DecoratorFactory' imported by the module 'AppModule'. Please add a @NgModule annotation.

(仅在运行时,CLI中没有错误)




这是我的app.module.ts文件:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule, Injectable } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { TabModule } from 'angular-tabs-component';
import { HttpClient, HttpClientModule, HttpClientJsonpModule } from '@angular/common/http';
import { NotificationModule } from '@progress/kendo-angular-notification';
import { FormsModule } from '@angular/forms';
import { GridModule } from '@progress/kendo-angular-grid';
import { LayoutModule } from '@progress/kendo-angular-layout';
import { ToolBarModule } from '@progress/kendo-angular-toolbar';
import { DialogModule } from '@progress/kendo-angular-dialog';
import { EditService } from './edit.service';
import { ReactiveFormsModule } from '@angular/forms';
import { GridEditFormComponent } from './edit-form.component';

@NgModule({
  imports:      [ BrowserModule, BrowserAnimationsModule, AppRoutingModule, TabModule, HttpClientModule, HttpClientJsonpModule, FormsModule, GridModule, NotificationModule,
    Injectable, LayoutModule, ToolBarModule, DialogModule, EditService, ReactiveFormsModule, GridEditFormComponent ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ]

})

export class AppModule { }


我需要导入NgModule,否则@NgModule接口声明会给我这个错误:

Cannot find name 'NgModule'. Did you mean 'module'?



注意:这不是this question的副本(我已按照说明进行了操作,但并没有解决错误)。

0 个答案:

没有答案