Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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