How can I introduce my PrimeNG.Table? -the source code is included

  • made a blank Angular6 project in which PrimeNG, intended to test the Table component of PrimeNG
  • the module that introduces table into AppModule. The complete code of AppModule is as follows:
import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";
import { AppComponent } from "./app.component";
import { AppRoutingModule } from "./app-routing.module";
import { FormsModule } from "@angular/forms";
import { HttpClientModule } from "@angular/common/http";

// primeng
import {ButtonModule} from "primeng/button";
import { TableModule } from "primeng/table";

// 

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,HttpClientModule,
    // primeng
    ButtonModule,TableModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

run the test through: ng serve-- open, at this time, and an error message appears:

  • AppModuleTableModuletable
    table:

  • Summary:
    button, that uses PrimeNG can be used normally
    error occurs when using table of PrimeNG:

    AppModuleTableModule
    AppModuleTableModuletable
    
  • how to introduce table components correctly?
  • complete source code of the project: https://pan.baidu.com/s/1tn-l.
Feb.10,2022

take a look at the github discussion, which seems to be the framework's own problem. Many people have also encountered this situation

github discussion

Menu