当前位置: 首页>>代码示例>>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;未经允许,请勿转载。