import { ActivatedRoute, Router } from '@angular/router';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
+import { NotificationsService } from 'angular2-notifications';
+
import {
SortField,
Video,
private subSearch: any;
constructor(
+ private notificationsService: NotificationsService,
private authService: AuthService,
private changeDetector: ChangeDetectorRef,
private router: Router,
this.loading.next(false);
},
- error => alert(error.text)
+ error => this.notificationsService.error('Error', error.text)
);
}
}
onRemoved(video: Video) {
+ this.notificationsService.success('Success', `Video ${video.name} deleted.`);
this.getVideos();
}