0

The tables on the project I'm working on have a certain wrapper around them, so in order to avoid code duplication I'm looking for a way to create a template where each component passes an ng-template, and it gets rendered inside the custom table template.

I've tried this approach, however when trying to reproduce it on a Stackblitz, I can't seem to get it working.

I'm trying to avoid this approach, where columns are defined on the component code.

Danyx
  • 574
  • 7
  • 34

1 Answers1

0

According to this github issue, this is not possible.

From reading the comment, this is apparently due to angular itself, which does not support content projection in more than 2 levels. So I guess for know you are stuck with defining columns in code.

That's probably why the SO solution you found was never accepted

David
  • 33,444
  • 11
  • 80
  • 118