本文整理汇总了TypeScript中angular2-notifications/components.NotificationsService类的典型用法代码示例。如果您正苦于以下问题:TypeScript NotificationsService类的具体用法?TypeScript NotificationsService怎么用?TypeScript NotificationsService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NotificationsService类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: handleError
private handleError(error: Response) {
this.notificationsService.error(this.messagesService.oops,
this.messagesService.somethingWentWrong);
return Observable.throw('Server error');
}
示例2: info
public info(message: string, title?: string) {
this._service.info(title || 'Info', message);
}
示例3: alert
public alert(message: string, title?: string) {
this._service.alert(title || 'Alert', message);
}
示例4: error
public error(message: string, title?: string) {
this._service.error(title || 'Failed', message);
}
示例5: success
public success(message: string, title?: string) {
this._service.success(title || 'Success', message);
}
示例6: onSubmit
onSubmit(value) {
this._notificationService.success('Success', 'You created an account!')
}