本文整理汇总了TypeScript中angular2-toaster/angular2-toaster.ToasterService.pop方法的典型用法代码示例。如果您正苦于以下问题:TypeScript ToasterService.pop方法的具体用法?TypeScript ToasterService.pop怎么用?TypeScript ToasterService.pop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2-toaster/angular2-toaster.ToasterService
的用法示例。
在下文中一共展示了ToasterService.pop方法的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']);
}
});
示例2: showToast
private showToast(type: string, title: string, body: string) {
this.toaster.pop({
type: type,
title: title,
body: body
});
}
示例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;
}
}
示例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);
}
示例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();
}
}
}
示例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();
}
示例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')
);
}
}
示例8:
this.ms.addMeetUp(this.meetup).then(() => {
this.ps.componentLoading();
this.toastr.pop('success', 'success', 'successfully added');
this.router.navigate(['/meetup/list']);
}, () => {
示例9:
error => {
this.toasterService.pop("error", "Error", error);
this.router.navigate(['/']);
});