I am trying to pass multiple ng-template
to my reusable component
(my-table component), content projection. Now I need to get the reference value of ea
I have built a table component in my library Easy Angular https://github.com/adriandavidbrand/ngx-ez/tree/master/projects/ngx-ez/src/lib/ez-table
Each column can take a template via a ViewChild
@ContentChild(TemplateRef)
template: TemplateRef;
The table uses ContentChildren to get the columns
@ContentChildren(EzColumnComponent)
columns: QueryList;
and the table component passes the current item in with a context when rendering
and is used like
Use item view variable in template here
Here is a demo of how it works
https://stackblitz.com/edit/angular-npn1p1
There is quite a bit to this table but all the source is up on GitHub.