- if (confirm('Do you really want to remove this video?')) {
- this.videoService.removeVideo(id).subscribe(
- status => this.removed.emit(true),
- error => alert(error)
- );
- }
+ this.confirmService.confirm('Do you really want to delete this video?', 'Delete').subscribe(
+ res => {
+ if (res === false) return;
+
+ this.videoService.removeVideo(id).subscribe(
+ status => this.removed.emit(true),
+
+ error => this.notificationsService.error('Error', error.text)
+ );
+ }
+ );