These are chat archives for angular/angular-2-ionic-2

10th
Jun 2016
pedrocortizo
@pedrocortizo
Jun 10 2016 07:34

Hi, anyone having problems with SQLStorage?

We have this code

constructor(private app: IonicApp, private platform: Platform, private menu: MenuController, private userData: UserData, private events: Events, public loadData: LoadData) {

    this.storage = new Storage(SqlStorage);

    this.storage.get('skip_slider').then((value) => {
        this.skip_slider = value;
        if (value) {        
            this.rootPage = HelloIonicPage;
        } else {                
            this.rootPage = IntroPage;
        }
    });

...

}```

As a Promise, the execution continues, and then the APP go to whitescreen because not having rootPage value

In this case the solucion in simple, but this is only a case about the delay of SQLStorage causes to my APP

In this case the solucion is initialize the var outside the Promise, but this is for testing purposes