I am looking for a solution to pass the current data of a component area to the ng-content
directive.
I have an app-table
component template with data that I want to pass to child content using some solution like this:
<table> <tr *ngFor="let item of data"> <ng-content [value]="item"></ng-content> //how to pass data? </tr> </table> //some html after
And the page template where I want to use this data:
<app-table> <td>{{value.Name}}</td> ... </app-table>
Is it possible?
source share