我正在尝试使用primeNG中的TreeTable,但是当我将其导入模块时,即TreeTableModule
到app.module.ts
会导致以下错误:
我没有使用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 { }
我不知道此问题的原因和来源。 任何帮助将不胜感激。
答案 0 :(得分:0)
请检查您的模块: 缺少逗号
imports: [
BrowserModule
,routing <= Missing Comma
,FeatureComponentsModule
],
imports: [
BrowserModule,
,routing <=Double Comma
,FeatureComponentsModule
],