aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/recommendations/recommended-videos.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/recommendations/recommended-videos.component.ts')
-rw-r--r--client/src/app/videos/recommendations/recommended-videos.component.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/src/app/videos/recommendations/recommended-videos.component.ts b/client/src/app/videos/recommendations/recommended-videos.component.ts
index 68fd750cc..7e0fb8856 100644
--- a/client/src/app/videos/recommendations/recommended-videos.component.ts
+++ b/client/src/app/videos/recommendations/recommended-videos.component.ts
@@ -1,4 +1,4 @@
1import { Component, Input, OnChanges } from '@angular/core' 1import { Component, Input, Output, OnChanges, EventEmitter } from '@angular/core'
2import { Observable } from 'rxjs' 2import { Observable } from 'rxjs'
3import { Video } from '@app/shared/video/video.model' 3import { Video } from '@app/shared/video/video.model'
4import { RecommendationInfo } from '@app/shared/video/recommendation-info.model' 4import { RecommendationInfo } from '@app/shared/video/recommendation-info.model'
@@ -12,6 +12,7 @@ import { User } from '@app/shared'
12export class RecommendedVideosComponent implements OnChanges { 12export class RecommendedVideosComponent implements OnChanges {
13 @Input() inputRecommendation: RecommendationInfo 13 @Input() inputRecommendation: RecommendationInfo
14 @Input() user: User 14 @Input() user: User
15 @Output() gotRecommendations = new EventEmitter<Video[]>()
15 16
16 readonly hasVideos$: Observable<boolean> 17 readonly hasVideos$: Observable<boolean>
17 readonly videos$: Observable<Video[]> 18 readonly videos$: Observable<Video[]>
@@ -21,6 +22,7 @@ export class RecommendedVideosComponent implements OnChanges {
21 ) { 22 ) {
22 this.videos$ = this.store.recommendations$ 23 this.videos$ = this.store.recommendations$
23 this.hasVideos$ = this.store.hasRecommendations$ 24 this.hasVideos$ = this.store.hasRecommendations$
25 this.videos$.subscribe(videos => this.gotRecommendations.emit(videos))
24 } 26 }
25 27
26 public ngOnChanges (): void { 28 public ngOnChanges (): void {