title: How to get the local json file path in angular2 nativescript
body: <ul>
  <li><p>I'm new to nativescript angular2. So far I followed documentation and
  did static datas with listview.</p></li>
  <li><p>I placed my json file in <code>app/utils/countries.json</code>.</p></li>
  <li><p>I don't know how to get the local file path to parse the json.Need suggestion regarding this.</p></li>
  <li><p>Below I have posted the codes for listview with static data.</p></li>
  </ul>
  
  <p><strong>typescript:</strong></p>
  
  <pre><code>import { Component, ElementRef, OnInit, ViewChild } from "@angular/core";
  
  @Component({
      selector: "ns-app",
      templateUrl: "app.component.html",
  })
  export class AppComponent implements OnInit {
  
   arrList: Array&lt;Object&gt; = [];
  
    ngOnInit() {
      this.arrList.push({ name: "India" });
      this.arrList.push({ name: "Sri Lanka" });
    }
  
   }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;page-router-outlet&gt;&lt;/page-router-outlet&gt;
  
  &lt;GridLayout&gt;
    &lt;ListView [items]="arrList" class="small-spacing"&gt;
      &lt;ng-template let-item="item"&gt;
        &lt;Label [text]="item.name" class="medium-spacing"&gt;&lt;/Label&gt;
      &lt;/ng-template&gt;
    &lt;/ListView&gt;
  &lt;/GridLayout&gt;
  </code></pre>
  
  <p><strong>countries.json:</strong> (app/utils/countries.json):</p>
  
  <pre><code>{
    "countries": [
                {"id":1,"name":"india"},
                {"id":2,"name":"Sri Lanka"}
  
     ]
  }
  </code></pre>