title: I can not access to the Typescript Class with "this" after ngClick
body: <p>I'm trying to acces to my class after a (click) on the template in Angular2+, but when I write console.log(this) I am getting the DOM object.</p>
  
  <p>Let me show you my code:</p>
  
  <pre><code>deleteClient(row: Client, event: any): void
  {
  
    console.log(this);
    console.log(event);
    console.log(this.notificationService);
  
    this.notificationService.open(...);
  
  }
  
  /* Aditional columns for clients. */
  addAditionalColumns(): SpeerdListAdditionalColumn[]{
  
    let addAditionalColumns = [{
        label: "Delete",
        icon: "far fa-trash-alt",
        onclick: this.deleteClient,
        textAlign: 'center'
    }];
  
    return addAditionalColumns;
  }
  </code></pre>
  
  <p>This is my template; list.tpl. I do a NgFor with the return off addAditionalColumns(). </p>
  
  <pre><code>&lt;!-- Additional columns --&gt;
  &lt;ng-container *ngFor="let additionalColumn of additionalColumns" [cdkColumnDef]="additionalColumn.label"&gt;
         &lt;!-- Head columns --&gt;
         &lt;cdk-header-cell *cdkHeaderCellDef [ngStyle]="{'text-align': additionalColumn.textAlign}"&gt;
                 {{additionalColumn.label}} 
         &lt;/cdk-header-cell&gt;
         &lt;!-- Body columns --&gt;
         &lt;cdk-cell *cdkCellDef="let row" [ngStyle]="{'text-align': additionalColumn.textAlign}"&gt; 
                &lt;i (click)="$event.stopPropagation(); additionalColumn.onclick(row, $event);" class="{{additionalColumn.icon}}"&gt;&lt;/i&gt; 
         &lt;/cdk-cell&gt;
  &lt;/ng-container&gt;
  </code></pre>
  
  <p>What I am getting with the console.log(this) in deleteClient function is:</p>
  
  <pre><code> {label: "Borrar", icon: "far fa-trash-alt", onclick: ƒ, textAlign: "center"}
  </code></pre>
  
  <p>And I need the ComponentClass instance. How can I access to class instance?</p>
  
  <p>Code:
  <a href="https://stackblitz.com/edit/angular-votuyc?embed=1&amp;file=src/app/app.component.ts" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-votuyc?embed=1&amp;file=src/app/app.component.ts</a></p>