0
我想更新變量上「確定」點擊彈出,但一些如何我無法更新變量。在控制檯中,它顯示更新的值,而不是在視圖中更新。離子2彈出處理函數不更新變量
this.barcodeScanner.scan().then((barcodeData) => {
let alert = this.alertCtrl.create({
title: 'Barcode scanned Successfully!',
subTitle: ''+barcodeData.text,
buttons: [{
text: 'OK',
handler:() => {
this.showForm = true;
this.memberVo["barcodeId"] = barcodeData.text;
}
}]
});
alert.present();
}, (err) => {
// An error occurred
console.log('barcode err--',err);
let alert = this.alertCtrl.create({
title: 'Barcode scan Failed!',
subTitle: ''+err,
buttons: ['OK']
});
alert.present();
});
這裏this.showForm = true;
變量不考慮更新/ HTML