Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

316
Views
<PrimeNG component> is not a known element even when imported

I'm trying to use the table component from the PrimeNG library in order to create a list of users. Even though the Table module is declared in the module "closest" to my component, I get the NG8001: 'p-table' component is not a known element error. I'm also using tailwind for CSS.

I already tried to declare the table module in the other modules I have in my app in case I made something wrong about this part but in vain. This makes me think it might be a lower level issue

Here is some code of my module :

import {TableModule} from "primeng/table";
// Other imports

@NgModule({
  declarations: [
    UsersComponent, // My component
  ],
    imports: [
        CommonModule,
        HttpClientModule,
        TableModule,
    ]
})
export class AdminDashboardModule { }

users.component.html :

<h1>Active users</h1>
<div class="border-b border-gray-200 shadow w-full">
  <p-table [value]="users">
    <ng-template pTemplate="header">
      <tr>
        <th>Username</th>
        <!-- Other headers -->
      </tr>
    </ng-template>
    <ng-template pTemplate="body" let-user>
      <tr>
        <td>{{user.username }}</td>
        <!-- Other values -->
      </tr>
    </ng-template>
  </p-table>
</div>

users.component.ts :

// Imports

@Component({
  selector: 'app-users',
  templateUrl: './users.component.html',
  styleUrls: ['./users.component.css']
})
export class UsersComponent implements OnInit {
  public users: User[];

  constructor(private userService: UserService) { }

  ngOnInit(): void {
    // Call to userService supplying users variable 
  }

}

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!