title: Angular2 Nativescript: how to pass ListView item on tap
body: <p>I have a following code:</p>
  
  <pre><code>  &lt;ListView [items]="newsList" (itemTap)="onTap($event)" class="list-group"&gt;
      &lt;template let-dataitem="item" let-i="index"&gt;
        &lt;GridLayout class="list-group-item"&gt;
            &lt;Label [text]="dataitem.title"&gt;&lt;/Label&gt;
            &lt;Label [text]="dataitem.body"&gt;&lt;/Label&gt;
         &lt;/GridLayout&gt;
      &lt;/template&gt;
    &lt;/ListView&gt;
  </code></pre>
  
  <p>I want to grub this list item with onTap method. here is my component where onTap method is located:</p>
  
  <pre><code>@Component({
     selector: "my-app",
     templateUrl: "app.component.html",
     styleUrls: ["app.component.css"],
     providers:[NewsService]
  })
  
  export class AppComponent {
    newsList;
    constructor(private router: Router, news: NewsService) {
       this.isLoading = true;
       news.getNews().subscribe(data =&gt; {
          this.newsList = data;
       })
    }
  
    public onTap(item: any) {
       this.isLoading = true;
       let navExtras: NavigationExtras = {
          queryParams:{
              "data" : item
          }
       }
       this.router.navigate(['/details'],navExtras);
    }
  }
  </code></pre>
  
  <p>On details component I'm just subscriping to queryParams </p>
  
  <pre><code>this.route.queryParams.subscribe(params =&gt; {
     this.data = params['data'];
  });
  </code></pre>
  
  <p>and displaying data..but is't shows <code>undefined</code>. 
  What am I doing wrong, and how to get data to pass around.</p>