Ionic 4 & Stencil.js
1 min read

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

Enjoying these posts? Subscribe for more