當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript AlertController.present方法代碼示例

本文整理匯總了TypeScript中ionic-angular.AlertController.present方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript AlertController.present方法的具體用法?TypeScript AlertController.present怎麽用?TypeScript AlertController.present使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ionic-angular.AlertController的用法示例。


在下文中一共展示了AlertController.present方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1:

 },error => {
     let alert = this.alert.create({
         title: 'Warning',
         subTitle: 'Wrong Username or Password! Please Try Again !',
         buttons: ['OK']
     });
     alert.present();
 });
開發者ID:cleybsoncardoso,項目名稱:SAEinfo,代碼行數:8,代碼來源:home.ts

示例2: showAlert

 showAlert(message) {
   let alert = this.alert.create({
     title: 'Error',
     subTitle: message,
     buttons: ['OK']
   });
   alert.present();
 }
開發者ID:weolopez,項目名稱:weolopez.github.io,代碼行數:8,代碼來源:home.ts

示例3: openAlert

 openAlert() {
   let alert = this.alert.create({
     title: 'New Friend!',
     subTitle: 'Your friend, Obi wan Kenobi, just accepted your friend request!',
     buttons: ['OK']
   });
   alert.present();
   alert.onDidDismiss(() => {
     let toast = this.toast.create({
       message: 'You closed an alert',
       duration: 3000,
     });
     toast.present();
   });
 }
開發者ID:jgw96,項目名稱:overlay-test,代碼行數:15,代碼來源:page1.ts

示例4:

		this.api.doLogin().then((data: any) => {
			if (!data.email) {
				let alert = this.alert.create({
					title: 'Error ' + data.status,
					subTitle: data._body,
					buttons: ['OK']
				});
				loading.dismiss();
				alert.present();
				return;
			}
			this.api.setData(this.api.data.username, this.api.data.password, this.api.data.url);
			this.api.user = data;
			this.api.saveUser(data);
			loading.dismiss();
			this.navCtrl.setRoot(Page1);
		}).catch((err) => {
開發者ID:seedgabo,項目名稱:siaphone,代碼行數:17,代碼來源:login.ts

示例5: handleResponse

  handleResponse(response){
  	let alert = null;
  	if(!!response["enterprise"]){
			this.enterprise = response["enterprise"];
			if(this.mode == "create")
      	this.enterprises.push(this.enterprise);
			alert = this.alert.create({
				title: "Success!",
				subTitle: `New enterprise ${this.mode}d!`,
				buttons: ["Ok"]
			});
		} else {
      if(!!response["errors"])
        this.errors = response["errors"];
      
			alert = this.alert.create({
				title: response["statusText"],
				subTitle: `Couldn't ${this.mode} the enterprise at the moment.`,
				buttons: ["Dismiss"]
			});
		}
		alert.present();
  }
開發者ID:baobba,項目名稱:userms-ui,代碼行數:23,代碼來源:enterprise-form.ts


注:本文中的ionic-angular.AlertController.present方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。