本文整理汇总了TypeScript中@eg/share/toast/toast.service.ToastService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.ToastService类的具体用法?TypeScript service.ToastService怎么用?TypeScript service.ToastService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.ToastService类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
).toPromise().then(async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error('Retarget Failed', this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
});
示例2: async
async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error(this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
this.cancelNext(ids);
}
示例3:
).toPromise().then(async(result) => {
if (Number(result) === 1) {
this.numSucceeded++;
this.toast.success(await this.successMsg.current());
} else {
this.numFailed++;
console.error('Mark missing failed ', this.evt.parse(result));
this.toast.warning(await this.errorMsg.current());
}
return this.markOneItemMissing(ids);
});
示例4:
).subscribe(resp => {
const evt = this.evt.parse(resp);
if (evt) {
this.toast.danger(evt.toString());
} else {
this.close();
}
});
示例5:
).toPromise().then(resp => {
const evt = this.evt.parse(resp);
if (evt) {
this.toast.danger(evt.toString());
} else {
this.close();
}
});
示例6: open
async open(args: NgbModalOptions): Promise<boolean> {
this.holdIds = [].concat(this.holdIds); // array-ify ints
this.transferTarget =
this.store.getLocalItem('eg.circ.hold.title_transfer_target');
if (!this.transferTarget) {
this.toast.warning(await this.targetNeeded.current());
return Promise.reject('Transfer Target Required');
}
return super.open(args);
}
示例7:
this.errorMsg.current().then(m => this.toast.danger(m));