@davidti wrote:
Hello,
I am trying to modify my toast message, rather than stacking up the toast boxes like so, I wanted to know if there is a possibility to update the message each time I do so. Here is my code.
import { ToastController, Toast } from 'ionic-angular'; private toastCtrl: ToastController; toast: Toast; try { this.toast.setMessage('Items '+itemCart+' | Rs '+this.total+''); } catch(e) {} this.toast = this.toastCtrl.create({ message: 'Items '+itemCart+' | Rs '+this.total+'', showCloseButton: true, closeButtonText:'View Cart', position: 'bottom', dismissOnPageChange: true }); this.toast.onDidDismiss(() => { this.navCtrl.setRoot(CartTabPage); }); this.toast.present();
Any help will be much appreciated. Thanks in advance
Posts: 2
Participants: 2