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