本文整理汇总了TypeScript中angular2-notifications.NotificationsService.info方法的典型用法代码示例。如果您正苦于以下问题:TypeScript NotificationsService.info方法的具体用法?TypeScript NotificationsService.info怎么用?TypeScript NotificationsService.info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2-notifications.NotificationsService
的用法示例。
在下文中一共展示了NotificationsService.info方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: logout
logout() {
localStorage.removeItem('access_token');
this.notify.info('Logged out', 'Goodbye');
setTimeout(() => {
this.router.navigate(['/login']);
}, 10);
}
示例2: Unshield
Unshield(post){
this.http.put('/api/post/'+post._id, {isShielded: false}).subscribe();
post.isShielded = false;
this._notificationsService.info(
'取消隐藏博客',
'文明上网~',
{
timeOut: 2000,
showProgressBar: true,
pauseOnHover: true,
clickToClose: false
});
}
示例3: if
this.playerLevel$.subscribe( (lvl) => {
if (first) {
first = false;
} else if (lvl >= GLOBALS.zoneLevelingMinLevel && (lvl % 5) == 0) {
console.log("You earned a Zi token. Yay.");
this.stats.ziTokens++;
this.Toasts.info(
`Level ${lvl}`,
`Gained a Zone Improvement token`,
{
timeOut: 5000
}
);
}
});
示例4: deleteComment
deleteComment(comment){
this.http.delete('/api/comment/'+comment._id).subscribe();
this._notificationsService.info(
'删除评论成功',
'坚决抵制恶意评论~',
{
timeOut: 2000,
showProgressBar: true,
pauseOnHover: false,
clickToClose: false
});
this.http.get<Comment[]>('/api/comments').subscribe(data => {
this.comments = data;
});
}
示例5: info
info(content: string, title: string = 'Información', override?: any) {
return this.notification.info(title, content, override);
}
示例6: info
info(title, msg) {
this.show();
this.delegate.info(title, msg);
}
示例7: info
info(description){
this.notificationService.info('Success', description);
}