ionic3 Alert组件的使用方法
html页面
<button ion-button color="danger" class="button-block button-round-ios" (click)="myAlert()">alert提示</button>
ts代码
import { Component } from '@angular/core';
import { AlertController } from 'ionic-angular';
@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  constructor(public navCtrl: NavController,public alertCtrl: AlertController,public toastCtrl: ToastController) {
  }
  myAlert(){
    let myalert=this.alertCtrl.create({});
      myalert.setTitle('项目分类列表');
      myalert.addButton('OK');
    myalert.present();
  }
 
}
    扬人之长,谅人之过!
 
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号