title: Nativescript Angular: How to pass a button view as a parameter in tap event ?
body: <p>My Nativescript Angular app dynamically returns data as a list of items. For each item, I use *ngFor to create a button with a tap event attached to it. I want to pass the button itself as a parameter as I need to add cssClass on tap. But I can't use ViewChild because the data is dynamic. How do I achieve this?</p>
  
  <pre><code>&lt;Button *ngFor="let item of items" [text]="item.name" (tap)="select(item, buttonObject ? )&gt;&lt;/Button&gt;
  
  
  select(item, buttonObject) {
    let button = &lt;View&gt;buttonObject.nativeElement;
    ...
  }
  </code></pre>
  
  <p>I appreciate your help. :)</p>