import { ActivatedRoute, Router } from '@angular/router';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
+import { NotificationsService } from 'angular2-notifications';
+
import {
SortField,
Video,
VideoService
} from '../shared';
-import { AuthService } from '../../core';
-import { AuthUser, RestPagination, Search, SearchField } from '../../shared';
+import { AuthService, AuthUser } from '../../core';
+import { RestPagination, Search, SearchField } from '../../shared';
import { SearchService } from '../../shared';
@Component({
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();
}