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


TypeScript dialogs.alert函數代碼示例

本文整理匯總了TypeScript中ui/dialogs.alert函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript alert函數的具體用法?TypeScript alert怎麽用?TypeScript alert使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


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

示例1: signin

 signin(email:string){
   console.info(email);
   if(!validator.validate(email)){
     alert("invalid email address");
   }
   this._router.navigate(["Home"]);
 }
開發者ID:SayreBlades,項目名稱:test2,代碼行數:7,代碼來源:login.component.ts

示例2: alert

export function alert(message: string) {
  return dialogsModule.alert({
    title: "Groceries",
    okButtonText: "OK",
    message: message
  });
}
開發者ID:BenAychh,項目名稱:sample-Groceries,代碼行數:7,代碼來源:dialog-util.ts

示例3: alert

 /**
  * Show alert with the message.
  * @param message The message.
  * @param title Optional alert title. Defaults to 'Racket O Meter'
  */
 public alert(message: string, title?: string): Promise<void> {
   return alert({
     title: title || "Racket O Meter",
     message,
     okButtonText: "OK",
   });
 }
開發者ID:racketometer,項目名稱:frontend-application,代碼行數:12,代碼來源:dialog.service.ts

示例4: function

 onMessageReceivedCallback: function(message) {
   dialogs.alert({
     title: "Push message: " + (message.title !== undefined ? message.title : ""),
     message: JSON.stringify(message.body),
     okButtonText: "W00t!"
   });
 },
開發者ID:cesarureno,項目名稱:Yowwlr,代碼行數:7,代碼來源:app.component.ts

示例5: onRejected

 private onRejected(error: any) {
   console.log(error);
   alert({
     title: 'Loading Error',
     message: LOADING_ERROR,
     okButtonText: 'Ok'
   });
 }
開發者ID:Alexisvt,項目名稱:nativescriptsamples,代碼行數:8,代碼來源:main-view-model.ts

示例6: displayAlertDialog

  displayAlertDialog() {
     // >> alert-dialog-code
     let options = {
         title: "Race selection",
         message: "Race chosen: Unicorn",
         okButtonText: "OK"
     };
     dialogs.alert(options).then(() => {
         console.log("Race chosen!");
     });
     // << alert-dialog-code
 }
開發者ID:aymenbraiek,項目名稱:nativescript-sdk-examples-ng,代碼行數:12,代碼來源:alert-dialog.component.ts

示例7: getLocation

 getLocation() {
     alert({message:"Getting your location !", okButtonText: "ok, thanks"});
     this.geolocatonService.getLocation(
         loc => {
             if (loc) {
                 this.latitude = String(loc.latitude);
                 this.longitude = String(loc.longitude);
             }
         },
         error => {
             console.log("Error: " + error.message);
         });
 }
開發者ID:Lev09,項目名稱:nativescript-angular-sample,代碼行數:13,代碼來源:another.component.ts

示例8: loadRegions

 public loadRegions(args: EventData) : void{
     this.logger.Notify("time to load regions");
     
     if(args){ 
         this.logger.Notify("There are args");
         //to do animate transition
     }
     
     alert("nav is broken - not sure why.");
     
     let promise: Promise<any, any> = this.router.navigate(["Regions"]);
     
     promise.then(() => {
         this.logger.Notify("I Should have navigated from start -> regions");
     });
     
     promise.catch(() => {
         this.logger.Notify("I failed navigating from start -> regions");
     });
 }
開發者ID:NathanWalker,項目名稱:WhatsMyScore2-NativeScript,代碼行數:20,代碼來源:mapPage.ts

示例9: alert

 public alert(msg: string): Promise<any> {
   return dialogs.alert(msg);
 }
開發者ID:Adam-Michalski,項目名稱:angular2-seed-advanced,代碼行數:3,代碼來源:window-native.service.ts

示例10: setTimeout

 setTimeout(() => {
   dialogs.alert(`${msg} For real. It's really working :)`).then(() => console.log(`Dialog closed.`));
 }, 2000);
開發者ID:triniwiz,項目名稱:nativescript-azure,代碼行數:3,代碼來源:azure.common.ts


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