title: ionic 2 sqlite run on android : cannot read property executeSql of undefined
body: <p>I write a test tabs ionic 2 app use sqlite plugin. I wrapper the sqlite as provier:</p>
  
  <pre><code>import { SQLite, Device } from 'ionic-native';
  import { Injectable } from '@angular/core';
  import { Http } from '@angular/http';
  import 'rxjs/add/operator/map';
  
  /*
    Generated class for the SqliteHelper provider.
  
    See https://angular.io/docs/ts/latest/guide/dependency-injection.html
    for more info on providers and Angular 2 DI.
  */
  @Injectable()
  export class SqliteHelper {
  
    public db : SQLite;
    public log : string = "";
    constructor(public http: Http) {
      console.log('Hello SqliteHelper Provider');
    }
  
    public initDb() {
      this.db = new SQLite();
      this.log += "openDatabase。。。";
      // if (Device.device.platform)
      this.db.openDatabase({
        name: "data.db",
        location: "default"
      }).then((data) =&gt;{
        this.log += ("open ok " + JSON.stringify(data));
      }, (err) =&gt; {
        this.log += ("open err " + err.message + " " + JSON.stringify(err));
      });
    }
  
    public executeSql(statement: string, parms:any) {
      return this.db.executeSql(statement, parms);
    }
  
  }
  </code></pre>
  
  <p>And init sqlitehelper in app.components :</p>
  
  <pre><code>  constructor(platform: Platform, sqliteHelper : SqliteHelper, events: Events) {
      platform.ready().then(() =&gt; {
        // Okay, so the platform is ready and our plugins are available.
        // Here you can do any higher level native things you might need.
        sqliteHelper.initDb();
        events.publish("sqlite:inited", null);
        StatusBar.styleDefault();
        Splashscreen.hide();
      });
    }
  </code></pre>
  
  <p>And I load data from the first tabs page in constructor with platform.ready, run it on android will cause err: cannot read property executeSql of undefined.</p>
  
  <p>If I load data from a button click, it's ok. or I put the loaddata to the second page's constructor, it's ok too.why?who can help me , I want to put code to the first page and load data at page started.</p>