本文整理匯總了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));