title: When click on the button in listview item, only that appropriate button text should change in angular2 nativescript
body: <ul>
  <li><p>I have created listview.For every listview item I'm having one
  button. When click on that button, I need to change the text.</p></li>
  <li><p><code>For Example :</code> I'm clicking on 0th index listview item button. When
  click on that button, it needs to change that button text only. But
  it is changing all the button texts.</p></li>
  <li><p><code>What's happening now :</code> When click on that button in listview item,
  It is changing the text in all button.</p></li>
  <li><p><code>What I need :</code> When click on that button in listview item, I need to
  change the text in that particular button only.</p></li>
  </ul>
  
  <p><strong>html:</strong></p>
  
  <pre><code>&lt;StackLayout class="page"&gt;
      &lt;ListView [items]="items" class="list-group"&gt;
  
      &lt;ng-template let-item="item" let-myIndex="index"&gt;
  
     &lt;GridLayout  rows="auto" columns="*, auto" &gt;
  
          &lt;Label [nsRouterLink]="['/item', item.id]" [text]="item.name" row="0" col="0" class="list-group-item"&gt; &lt;/Label&gt;
  
          &lt;Button  text= "{{textBtn}}" (tap) ="checkInstall($event)" row="0" col="1" [id]="myIndex"&gt; &lt;/Button&gt;   ----&gt; Getting button index
  
     &lt;/GridLayout&gt;
  
     &lt;/ng-template&gt;
  
    &lt;/ListView&gt;
  &lt;/StackLayout&gt;
  </code></pre>
  
  <p><strong>ts file:</strong></p>
  
  <pre><code>  checkInstall(args: EventData) : void{
  
      let button = &lt;Button&gt;args.object;
  
      this.getId = args.object.get("id");
  
      if(this.getId == 0) {     ---&gt; based on the button index 0, checking app is installed or not.   
  
       appavailability.available("com.facebook.lite").then((avail: boolean) =&gt; {
  
      console.log("App available? " + avail);
  
      if(avail == true){
  
      console.log("button id :"+ args.object.get("id"));
  
      this.textBtn = "Remove"; 
  
      console.log("True", "Test");
  
      } else {
  
      console.log("False", "Test");
  
      }
  
    });
  
    } else {
  
  
       this.textBtn = "Install"; 
  
    }
   }   
  </code></pre>
  
  <p><strong>cmd:</strong></p>
  
  <p>When clicking on the 0th position listview button, I'm getting this:</p>
  
  <pre><code>App Available ? true
  button id : 0
  True Test
  </code></pre>