Site icon GitBook

Ionic 4 & Stencil.js

description : Dev tips in Stencil.js


Use Ionic 4 Ion Toast Controller in Stencil.js

 @Prop({ connect: 'ion-toast-controller' }) toastCtrl: HTMLIonToastControllerElement; async showMessage(){
   const toast = await this.toastCtrl.create({
     message: 'Hello World',
     showCloseButton: true,
     closeButtonText: 'Close',
     position: 'middle'
     });
     await toast.present();
 }

Example: https://github.com/ionic-team/ionic-stencil-conference-app

Quitter la version mobile