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


TypeScript ToastsManager.error方法代码示例

本文整理汇总了TypeScript中ng2-toastr/ng2-toastr.ToastsManager.error方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ToastsManager.error方法的具体用法?TypeScript ToastsManager.error怎么用?TypeScript ToastsManager.error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ng2-toastr/ng2-toastr.ToastsManager的用法示例。


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

示例1:

 }, (error) => {
     if (error && error.status === 404) {
         this._router.navigate(["ToursList"]);
         this._notificationService.error("Tokia kelionė neegzistuoja");
         return;
     }
     this._notificationService.error("Nežinoma klaida");
     
 });
开发者ID:tautvisv,项目名称:HPTB,代码行数:9,代码来源:travel-view.component.ts

示例2: validateUserSettings

 private validateUserSettings(userSettings: UserSettings): boolean {
     if (!userSettings.Email) {
         this._notificationService.error("Elektroninis paštas yra privalomas laukas");
         return false;
     }
     return true;
 }
开发者ID:tautvisv,项目名称:HPTB,代码行数:7,代码来源:user-settings.component.ts

示例3:

 (err: any) => {
     var message = "";
     if (err) {
         var response = err.json();
         message = (response && response.Message) ? response.Message : "";
     }
     this._notificationService.error("Atnaujinti vartotojo duomenų nepavyko. " + message);
 }
开发者ID:tautvisv,项目名称:HPTB,代码行数:8,代码来源:user-settings.component.ts

示例4:

 this._containerService.waitOperation(operationId).subscribe(operation => {
     if (operation.status_code >= 400) {
         this.toastr.error(operation.err, operation.status);
     } else {
         this.toastr.success('', operation.status);
     }
     this.updateStatus();
 });
开发者ID:jphilaine,项目名称:lxd-webui,代码行数:8,代码来源:container-detail.component.ts

示例5: onSubmit

 onSubmit() {
     if (this.mission.name != '') {
         this._dataService.postDataMission(this.mission);
         this._router.navigate(['/Home/Mission']);
     }
     else {
         this._toastr.error('Thank you to fill the fields', 'Oops!')
     }
 }
开发者ID:clamarque,项目名称:Angular2_Dashboard,代码行数:9,代码来源:mission-create.component.ts

示例6:

 this._authService.signIn(this.email, this.password, (error: any) => {
     if (error) {
         this._toastr.error(error, 'Oops !')
     }
     else {
         this._router.navigate(['/Home']);
         this._toastr.success(this.email, 'Welcome back');
     }
 })
开发者ID:clamarque,项目名称:Angular2_Dashboard,代码行数:9,代码来源:collaborator-signin.component.ts

示例7:

 this._authService.sendPasswordResetEmail(this.email, (error: any) => {
     if(error) {
         this._toastr.error(error, 'Oops !')
     }
     else {
         this._toastr.success(this.email, 'Thank you! an email is sent to you')
         this._router.navigate(['']);
     }
 });
开发者ID:clamarque,项目名称:Angular2_Dashboard,代码行数:9,代码来源:collaborator-reset.component.ts

示例8: onSubmit

 onSubmit() {
     if (this.skill.name != '') {
         this._dataService.postData('skill', this.skill);
         this._router.navigate(['/Home/Skill'])
         this._toastr.success('Skill created')
     }
     else {
         this._toastr.error('Thank you to fill the field', 'Oops!') 
     }
 }
开发者ID:clamarque,项目名称:Angular2_Dashboard,代码行数:10,代码来源:skill-create.component.ts

示例9: onSubmit

 onSubmit() {
     if (this.role.name != '') {
         this._dataService.postDataRole(this.role);
         this._router.navigate(['/Home/Role'])
         this._toastr.success('Role created')
     }
     else {
         this._toastr.error('Thank you to fill the field', 'Oops!')
     }
 }
开发者ID:clamarque,项目名称:Angular2_Dashboard,代码行数:10,代码来源:role-create.component.ts

示例10:

 this._loginService.login(this.email, this.password, (error: any) => {
     if (error) {
         this._toastr.error('Incorrect username or password', 'Oops !')
     }
     else {
         localStorage.setItem('username', this.email);
         this._router.navigate(['/Home']);
         this._toastr.success( this.email, 'Welcome back');
     }
 })
开发者ID:chaabni,项目名称:Angular2_Dashboard,代码行数:10,代码来源:login.component.ts


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