i have a definition of templates in my angular app:
<div class="wrapper" grid [data]="data">
<div class="cell" *cellDef="let cell">{{cell.id}}</col>
<div class="row" *rowDef="let row"></div>
</div>
Right now I create "rows" in a directive based on some data injected to wrapper. I create for example 10 rows by creating embeddedViews with templateRef and viewContainerRef of rowDef.
Same for cells, but I want to render cells inside of the rows viewRef. My problem right now is, that I am not able to get the viewContainerRef of the embedded TR Element created by rowDef.
Attaching another directive (non-strucural) let me inject the viewContainerRef, but it only gave me the viewContainerRef where the tr is rendered. How can I get the viewContainerRef inside the tr element to attach the cells to?
<div class="row" *rowDef="let row" non-structural-directive></div>
@Directive({selector: '[non-structural-directive]'})
export class NonStructuralDirective {
// points to "wrapper" instead of "row" so it isn't helpful at all
constructor(vc:ViewContainerRef)
}