How to access ngFor variable from child component or directive

the answer is ViewContainerRef

when you inject it into your constructor it has so much data in it. the ngFor data is in['_view']['context']['$implicit']

directive full example

    selector: 'td'
export class AddInvAmountBtnDirective implements  AfterViewInit {

  constructor(ref:ElementRef, private vcViewContainerRef) {
    this.el = ref.nativeElement

  @HostListener('click', ['$event']) tdClick(evEvent){


Popular posts from this blog

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

Asp.Net Ending Response options, Response.End() vs CompleteRequest()