本文整理匯總了TypeScript中ng2-toastr/ng2-toastr.ToastsManager類的典型用法代碼示例。如果您正苦於以下問題:TypeScript ToastsManager類的具體用法?TypeScript ToastsManager怎麽用?TypeScript ToastsManager使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了ToastsManager類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
this._containerService.waitOperation(operationId).subscribe(operation => {
if (operation.status_code >= 400) {
this.toastr.error(operation.err, operation.status);
} else {
this.toastr.success('', operation.status);
}
this.updateStatus();
});
示例2:
this._authService.signIn(this.email, this.password, (error: any) => {
if (error) {
this._toastr.error(error, 'Oops !')
}
else {
this._router.navigate(['/Home']);
this._toastr.success(this.email, 'Welcome back');
}
})
示例3:
}, (error) => {
if (error && error.status === 404) {
this._router.navigate(["ToursList"]);
this._notificationService.error("Tokia kelionÄ neegzistuoja");
return;
}
this._notificationService.error("NeĹžinoma klaida");
});
示例4:
this._authService.sendPasswordResetEmail(this.email, (error: any) => {
if(error) {
this._toastr.error(error, 'Oops !')
}
else {
this._toastr.success(this.email, 'Thank you! an email is sent to you')
this._router.navigate(['']);
}
});
示例5: onSubmit
onSubmit() {
if (this.customer.mission != '' && this.customer.name != '') {
this._dataService.postDataCustomer(this.customer);
this._router.navigate(['/Home/Customer']);
this._toastr.success('Customer created')
}
else {
this._toastr.error('Thank you to fill the fields', 'Oops!')
}
}
示例6: onSubmit
onSubmit() {
if (this.skill.name != '') {
this._dataService.postData('skill', this.skill);
this._router.navigate(['/Home/Skill'])
this._toastr.success('Skill created')
}
else {
this._toastr.error('Thank you to fill the field', 'Oops!')
}
}
示例7: onSubmit
onSubmit() {
if (this.role.name != '') {
this._dataService.postDataRole(this.role);
this._router.navigate(['/Home/Role'])
this._toastr.success('Role created')
}
else {
this._toastr.error('Thank you to fill the field', 'Oops!')
}
}
示例8:
this._loginService.login(this.email, this.password, (error: any) => {
if (error) {
this._toastr.error('Incorrect username or password', 'Oops !')
}
else {
localStorage.setItem('username', this.email);
this._router.navigate(['/Home']);
this._toastr.success( this.email, 'Welcome back');
}
})
示例9: retrievePlaylist
public retrievePlaylist(): void {
if (!this.playlistId) {
this.toastr.error('Please provide a playlist id');
return;
}
this.toastr.info('Retrieving playlist...');
this.subscription = this.apiService.getPlaylistItems(this.playlistId, 50).subscribe((data) => {
this.resultJson = data;
console.log(data)
}, error => this.handleError(error));
}
示例10: if
this.service.like(this.travelId, 0).subscribe((status) => {
if (this.travelLikesData.UserLikeStatus === 1) {
this.travelLikesData.LikesCount--;
} else if (this.travelLikesData.UserLikeStatus === -1) {
this.travelLikesData.DislikesCount--;
} else {
this.notificationManager.info("status: " + this.travelLikesData.UserLikeStatus);
}
this.travelLikesData.UserLikeStatus = status;
this.notificationManager.info("Panaikintas statusas");
},