Skip to content

Instantly share code, notes, and snippets.

@RubyRonin
Created May 11, 2017 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RubyRonin/761e5bcb39820e112a84a720bc26e587 to your computer and use it in GitHub Desktop.
Save RubyRonin/761e5bcb39820e112a84a720bc26e587 to your computer and use it in GitHub Desktop.
constructor() {
this.initializeApp();
}
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
this.storage.get('isLoggedIn').then((val) => {
if (val == true) {
this.services.isLoggedIn = true;
this.rootPage = TabsPage;
} else {
this.services.isLoggedIn = false;
this.rootPage = LoginPage;
}
});
});
}
constructor(){
this.login.email_address = (this.isLoggedIn == true) ? this.storage.get('email_address').then((val) => {return val;}) : '';
this.login.last4ofdl = (this.isLoggedIn == true) ? this.storage.get('last4ofdl').then((val) => {return val;}) : '';
this.login.last4ofdlConfirm = '';
this.login.push_token = (this.isLoggedIn == true) ? this.storage.get('push_token').then((val) => {return val;}) : '';
this.login.phone_number = '';
this.login.device_id = (this.isLoggedIn == true) ? this.storage.get('device_id').then((val) => {return val;}) : '';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment