PrimeNG v18 - Table Wrapper Component, how? #2797
Unanswered
denizguzel
asked this question in
PrimeNG
Replies: 1 comment
-
@denizguzel Hi. You can use ContentChild to access a template from the content part of the parent component: @ContentChild('headerTemplate') headerTemplate!: TemplateRef<any>;
@ContentChild('bodyTemplate') bodyTemplate!: TemplateRef<any>; Example code: Essentially this is what the PrimeNg table also does in the underlying logic: First, capture the incoming templates: Then use it with ngTemplateOutlet |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am trying to create a re-usable table component while using p-table.
And when I use it like below,
The p-table component isn't displaying anything. Am I doing something wrong, or is it not possible to use it this way?
The project is using Angular 18.2.6, PrimeNG 18.0.0-beta.2, and experimental zoneless change detection, without importing zone.js.
Beta Was this translation helpful? Give feedback.
All reactions