AOT compile error, Table declared twice eventhough not importing TableModule

UI Components for Angular
Post Reply
Posts: 1
Joined: 17 May 2019, 14:40

17 May 2019, 14:59

Trying to customize the table paginator using my own custom component (template).
It fails under AOT complaining about components being declared twice.
I removed every reference/import to "primeng/primeg" (which took a while ;( ) as stated in some forum/search.
There´s an identical issue

So if I do this...

Code: Select all

    imports: [
exports: [TableModule],
    declarations: [
export class MyTableModule {}
primeNG is not 'aware' of my component (which uses the same 'p-paginator' selector to override), which makes sense due to scopes/encapsullation.

So the ¿obvious? choice is to re-declare all TableModule in my own module, adding the overriden component... such as:

Code: Select all

declarations: [
         ...primengDeclared, // this includes Table, and so on.... 

    exports: [
     ...primengExported, // this includes Table, and so on.... 
This works fine until you try to build an AOT compilation, then it fails with "table (...) is part of the declarations of 2 modules: TableModule and (MyTableModule).
It seems like it´s evaluating TableModule eventhough i´m not importing it. And it might be because it´s in the same .ts file as the imported components. This is very problematic....
Thanks in advance

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests