title: How to read a local file json in ionic?
body: <p>Help I need to read a json file in app with ionic and i'm started in this theme and i don't know how do this.</p>
  
  <p>Ok So in this class is a provider in this case I put data from <a href="https://randomuser.me" rel="nofollow noreferrer">https://randomuser.me</a></p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http } from '@angular/http';
  import 'rxjs/add/operator/map';
  import 'rxjs/add/operator/toPromise';
  
  @Injectable()
  export class SoilsServeProvider {
  
  constructor(public http: Http) {
  
  }
  getUsers() {
  return this.http.get('https://randomuser.me/api/?results=15')
  .map(res =&gt; res.json())
  .toPromise();
  }
  
  }
  </code></pre>
  
  <p>in another class I put this, in the controller</p>
  
  <pre><code>import { Component } from '@angular/core';
  import { IonicPage, NavController, NavParams } from 'ionic-angular';
  import { SoilsServeProvider } from '../../providers/soils-serve/soils-
  serve';
  
  
  @IonicPage()
  @Component({
  selector: 'page-cultivos',
  templateUrl: 'cultivos.html',
  })
  export class CultivosPage {
  users: any[] = [];
  constructor(public navCtrl: NavController, public navParams: NavParams,
  public userService: SoilsServeProvider) {
  }
  
  ionViewDidLoad(){
  this.userService.getUsers()
  .then(data =&gt; {
    this.users = data.results;
  })
  .catch(error =&gt;{
    console.error(error);
  })
  }
  }
  </code></pre>
  
  <p>finally en the view </p>
  
  <pre><code>&lt;ion-header&gt;
  &lt;ion-navbar color="primary"&gt;
  &lt;ion-title&gt;
    Demo 10
  &lt;/ion-title&gt;
  &lt;/ion-navbar&gt;
  &lt;/ion-header&gt;
  
  &lt;ion-content&gt;
  &lt;ion-list&gt;
  &lt;ion-item *ngFor="let user of users"&gt;
    &lt;ion-avatar item-start&gt;
      &lt;img [src]="user.picture.medium"&gt;
    &lt;/ion-avatar&gt;
    &lt;h2&gt;{{ user.name.first | uppercase }}&lt;/h2&gt;
    &lt;p&gt;{{ user.email }}&lt;/p&gt;
  &lt;/ion-item&gt;
  &lt;/ion-list&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>and the result is this</p>
  
  <p><a href="https://i.stack.imgur.com/68AM4.png" rel="nofollow noreferrer">result</a></p>
  
  <p>this example it's ok but I want read data from a local json, for example the path it's app/assets/data.json</p>