I'm trying to implement a login, which has 2 registration options, one with your data that is in FB, and the other put them manually.
In the first form, the user uses his / her facebook account, to obtain the corresponding data of this username and mail, then this is addressed to the next view or interface, where he must place a telephone number, to then place the data in input's or text boxes.
In the second registration option, the user uses the option Register Now , where the user is taken to the previously mentioned page, but in this case, the input's are empty.
My error arises when I give it in the second option, and I get the following error and it does not show the screen:
It tells me that it is empty Then my question is the following as I make it when it arrives empty show the normal screen
Maybe this is an error in this class:
ionViewCanEnter() {
console.log('Ya llegue');
let env = this;
return this.nativeStorage.getItem('user')
.then(function (data) {
env.user = {
name: data.name,
email: data.email
};
console.log(env.user);
env.userReady = true;
return true;
}, function (error) {
console.log(error);
return false;
});
}
And this is my html of my home page where the 2 buttons arrive:
<ion-content padding class="body" align="center">
<img src="assets/logito.png">
<br>
<br>
<ion-list *ngIf="userReady">
<ion-item>
<ion-label>
<ion-icon name="person"></ion-icon>
</ion-label>
<ion-input type="text" placeholder="Nombres" [(ngModel)]="user.name">
</ion-input>
</ion-item>
<ion-item>
<ion-label>
<ion-icon name="mail"></ion-icon>
</ion-label>
<ion-input type="text" placeholder="Nombres" [(ngModel)]="user.email">
</ion-input>
</ion-item>
<ion-item>
<ion-label>
<ion-icon name="call"></ion-icon>
</ion-label>
<ion-input clearInput type="number" placeholder="Teléfono">
</ion-input>
</ion-item>
</ion-list>
<button ion-button item-end round full icon-start color="dark" class="botones">
<ion-icon name='checkmark-circle-outline'></ion-icon>
registar
</button>
</ion-content>