From 7ddd02c9b8c1e088f6679a2227f105e6439fc992 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Jan 2017 16:14:11 +0100 Subject: Client: better notifications for a beautiful world --- client/src/app/videos/video-add/video-add.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'client/src/app/videos/video-add/video-add.component.ts') diff --git a/client/src/app/videos/video-add/video-add.component.ts b/client/src/app/videos/video-add/video-add.component.ts index 1e700ae48..cd6bb9989 100644 --- a/client/src/app/videos/video-add/video-add.component.ts +++ b/client/src/app/videos/video-add/video-add.component.ts @@ -3,6 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms'; import { Router } from '@angular/router'; import { FileUploader } from 'ng2-file-upload/ng2-file-upload'; +import { NotificationsService } from 'angular2-notifications'; import { AuthService } from '../../core'; import { FormReactive, VIDEO_NAME, VIDEO_DESCRIPTION, VIDEO_TAGS } from '../../shared'; @@ -38,7 +39,8 @@ export class VideoAddComponent extends FormReactive implements OnInit { private authService: AuthService, private elementRef: ElementRef, private formBuilder: FormBuilder, - private router: Router + private router: Router, + private notificationsService: NotificationsService ) { super(); } @@ -151,6 +153,8 @@ export class VideoAddComponent extends FormReactive implements OnInit { clearInterval(interval); console.log('Video uploaded.'); + this.notificationsService.success('Success', 'Video uploaded.'); + // Print all the videos once it's finished this.router.navigate(['/videos/list']); -- cgit v1.2.3