If a template inside of the template for a component looks like so:
<ng-template #myRef let-item>
<span class="whatever">{{item?.cockroachPower}}</span>
</ng-template>
Back on the TypeScript side of a component you just need something like this:
@ViewChild('myRef') myRef: TemplateRef<any>;
No comments:
Post a Comment