I want to set a default value in ionic input .. please help
address.html file code
<ion-item>
<ion-label floating>{{'address.email'|translate}}</ion-label>
<ion-input type="text" formControlName="user_email"></ion-input>
</ion-item>
default mail like example@gmail.com
adderss.ts
ionViewDidEnter() {
if (this.isCache) this.getData();
else this.isCache = true;
}
getData() {
this.storageMul.get(['login', 'useBilling', 'user']).then(val => {
if (val['login']) this.login = val['login'];
if (val['useBilling'] == false) this.useBilling = false;
else this.useBilling = true;
if (val['user']) {
this.data = val['user'];
}
this.reset();
});
}
reset() {
this.formAddress.patchValue({
billing_first_name: this.data["billing_first_name"],
billing_address_1: this.data["billing_address_1"],
billing_phone: this.data["billing_phone"],
user_email: this.data["user_email"],
shipping_first_name: this.data["shipping_first_name"],
shipping_address_1: this.data["shipping_address_1"],
});
please help me out!!