本文整理汇总了TypeScript中toastr.success函数的典型用法代码示例。如果您正苦于以下问题:TypeScript success函数的具体用法?TypeScript success怎么用?TypeScript success使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了success函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: showUINotificationInfo
function showUINotificationInfo(uiNotificationInfo: UINotificationInfo) {
if (uiNotificationInfo.succeeded) {
toastr.success(uiNotificationInfo.successMessage);
} else {
toastr.error(uiNotificationInfo.errorMessage);
}
}
示例2: switch
this.toastsPromise.then((toasts: IToast[]) => {
for (let t of toasts){
//Setup callbacks to track dismisal status
let overrides: ToastrOptions = {
onclick: () => {
ToastService.acknowledgeToast(t.Id, this.context.pageContext.web.id);
},
onCloseClick: () => {
ToastService.acknowledgeToast(t.Id, this.context.pageContext.web.id);
}
};
switch (t.Severity){
case 'Warning':
toastr.warning(t.Message, t.Title, overrides);
break;
case 'Error':
toastr.error(t.Message, t.Title, overrides);
break;
case 'Success':
toastr.success(t.Message, t.Title, overrides);
break;
default:
toastr.info(t.Message, t.Title, overrides);
break;
}
}
}).catch((error: any): void => {
示例3: stopTimer
stopTimer(valid?: boolean): void {
if (this.proccessing) {
console.log('Stop Timer');
if (valid) {
this.endTime = lodash.now();
this.textFinished = this.text;
this.textMissed = null;
toastr.success('PERFECT! ' + this.result + '\nLet\'s watch True-time Replay.'); // alert('COMPLETED! ' + this.result + "\nLet's watch True-time Replay.");
this.startTruetimeReplay();
} else {
this.textMissed = this.text;
}
this.text = null;
this.proccessing = false;
}
}
示例4: showSuccessToast
public static showSuccessToast(title: string, details: string, duration: number = 1000) {
Notifications.setupToastrOptions(duration, true);
toastr.success(details, title);
}
示例5:
this.busyHandler.handle(obs$).subscribe((result:AuthenticationResult) => {
window.localStorage.setItem(LOCALSTORAGE_AUTH, JSON.stringify(result));
this.store.dispatch({type: DATA_AUTHENTICATION_SET_AUTHENTICATION, payload: result});
toastr.success("successfully logged in!");
}, (errorResponse:Response) => {
示例6:
this.busyHandlerService.handle(obs$).map(resp => resp.json()).subscribe((result: AuthenticationResult) => {
window.localStorage.setItem(LOCALSTORAGE_AUTH, JSON.stringify(result));
this.store.dispatch(setAuthentication(result));
toastr.success("successfully logged in!");
}, (errorResponse: Response) => {
示例7:
return this.http.delete(`/api/schedulers/${this.schedulerName}/calendars/${this.name}`).then(() => {
toastr.success(`Calendar ${this.name} deleted successfully`);
return this.router.navigate("calendars");
});
示例8: activate
activate()
{
toastr.success('tets')
}
示例9: showSuccess
export function showSuccess(message) {
toastr.success(message);
}
示例10:
.subscribe(() => {
toastr.success('Successfully updated.');
}, this.handleError);