从primeng导入TreeTableModule会导致错误

时间:2019-10-11 06:57:32

标签: angular primeng treetable

我正在尝试使用primeNG中的TreeTable,但是当我将其导入模块时,即TreeTableModuleapp.module.ts会导致以下错误:

enter image description here

我没有使用DropdownModule,但仍然显示错误:

  

模块DropdownModule导入的意外值'undefined'。

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { MaterialModule } from './material/material.module';
import { OrganizationChartModule } from 'primeng/organizationchart';
import { TreeTableModule } from 'primeng/treetable';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    CommonModule,
    FormsModule,
    HttpClientModule,
    OrganizationChartModule,
    TreeTableModule,
    MaterialModule
  ],
  providers: [ HttpClientModule ],
  bootstrap: [ AppComponent ]
})
export class AppModule { }

我不知道此问题的原因和来源。 任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

请检查您的模块: 缺少逗号

imports: [
    BrowserModule
   ,routing <= Missing Comma
   ,FeatureComponentsModule
  ],

imports: [
    BrowserModule, 
   ,routing <=Double Comma
   ,FeatureComponentsModule
  ],
相关问题