typescript IF_04_16_ToastController_TS

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript IF_04_16_ToastController_TS相关的知识,希望对你有一定的参考价值。

import { Component } from '@angular/core';
import { ToastController } from '@ionic/angular';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  constructor(public toastCtrl: ToastController){

  }

  async showToast(){

    let toast = await this.toastCtrl.create({
      message: "Account has been created",
      duration: 5000,
      showCloseButton: true,
      position: "bottom"
    });

    toast.present();

  }

}

以上是关于typescript IF_04_16_ToastController_TS的主要内容,如果未能解决你的问题,请参考以下文章

typescript IF_04_20_Actionsheet_TS

typescript IF_04_18_AlertController_TS

typescript IF_04_14_LoadingController_TS

typescript IF_04_10_Checkbox_Binding_2_TS

typescript IF_04_12_Select_Binding_TS

typescript IF_04_08_Checkbox_Binding_TS