当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript angular2-toaster.ToasterService类代码示例

本文整理汇总了TypeScript中angular2-toaster/angular2-toaster.ToasterService的典型用法代码示例。如果您正苦于以下问题:TypeScript ToasterService类的具体用法?TypeScript ToasterService怎么用?TypeScript ToasterService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ToasterService类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1:

 .catch((error) => {
   this.progressBarService.componentLoading();
   if (error['code'] === 'auth/wrong-password') {
     this.toastr.pop('error', 'Fail', 'Wrong password or email');
   }else {
     this.toastr.pop('error', 'error', error['message']);
   }
 });
开发者ID:jerry-i,项目名称:meetup-events,代码行数:8,代码来源:sign.component.ts

示例2: showToast

 private showToast(type: string, title: string, body: string) {
     this.toaster.pop({
         type: type,
         title: title,
         body: body
     });
 }
开发者ID:james-hu,项目名称:rtstatistics-web-mconsole,代码行数:7,代码来源:notification.service.ts

示例3: processToastRequest

 private processToastRequest(status: IActionStatus): void {
     
     switch (status.status) {
         case "success":
             this._toasterService.pop("success", "That Worked!", status.message)
             break;
         case "error":
             this._toasterService.pop("error", "It Works on my Computer!", status.message);
             break;
         case "warning":
             this._toasterService.pop("warning", "WTH!", status.message);
             break;
         case "info":
             this._toasterService.pop("info", "FYI!", status.message);
             break;
     }
 }
开发者ID:SoftCodeGit,项目名称:BookmarkGenerator,代码行数:17,代码来源:toast.component.ts

示例4: errror

 /**
  * Affiche une erreur
  * @param  {any}    error l'erreur Ă  affichĂŠe
  */
 errror(error : any) {
   let toast: Toast = {
       type: 'error',
       title: 'Erreur',
       showCloseButton: true,
       body: error.message || error,
   };
   this.toastr.pop(toast);
 }
开发者ID:gurdilou,项目名称:ProxiJobs,代码行数:13,代码来源:notification.service.ts

示例5: onUpload

    private onUpload() {
        let i: number;

        for (i = 0; i < this.uploader.queue.length; i++) {
            let name: string = this.uploader.queue[i].file.name;
            if (this.exist(name)) {
                this.toasterService.pop('error', name + space + this.translate('exist'));
                this.uploader.queue[i].remove();
            } else {
                this.uploader.queue[i].upload();
            }
        }        
    }
开发者ID:NazDov,项目名称:myosbb,代码行数:13,代码来源:osbb-docs-and-reports.component.ts

示例6: createNewFolder

 private createNewFolder(name: string) {
     if (this.exist(name)) {
         this.toasterService.pop('error', name + space + this.translate('exist'));
     } else {
         this.driveService.createFolder(name, this.currentFolder).subscribe(
             data => {
                 this.initFolder(this.currentFolder);
                 this.toasterService.pop('success', name + space + this.translate('created'));
             },
             error => this.toasterService.pop('error', name + space + this.translate('exist'))
             );
     }
     this.newFolder = new DriveFile();
 }
开发者ID:NazDov,项目名称:myosbb,代码行数:14,代码来源:osbb-docs-and-reports.component.ts

示例7: update

 private update() {
     let name: string = this.editable.name;
     if (this.exist(name)) {
         this.toasterService.pop('error', name + space + this.translate('exist'));
     } else {
         this.driveService.update(this.editable.id, name).subscribe(
             data => {
                 this.editable = data;
                 this.initFolder(this.currentFolder);
             },
             error => this.toasterService.pop('error', 'could_not_update')
         );
     }
 }
开发者ID:NazDov,项目名称:myosbb,代码行数:14,代码来源:osbb-docs-and-reports.component.ts

示例8:

 this.ms.addMeetUp(this.meetup).then(() => {
   this.ps.componentLoading();
   this.toastr.pop('success', 'success', 'successfully added');
   this.router.navigate(['/meetup/list']);
 }, () => {
开发者ID:jerry-i,项目名称:meetup-events,代码行数:5,代码来源:meetup-form.component.ts

示例9:

 error => {
   this.toasterService.pop("error", "Error", error);
   this.router.navigate(['/']);
 });
开发者ID:tchoulihan,项目名称:flowchat,代码行数:4,代码来源:community-modlog.component.ts


注:本文中的angular2-toaster/angular2-toaster.ToasterService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。