blob: 6f862718f22acfb0e0cefbbe17a3927a423c2b19 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
@Component({
selector: 'my-video-channel-about',
templateUrl: './video-channel-about.component.html',
styleUrls: [ './video-channel-about.component.scss' ]
})
export class VideoChannelAboutComponent implements OnInit {
videoChannel: VideoChannel
constructor (
protected route: ActivatedRoute,
private videoChannelService: VideoChannelService
) { }
ngOnInit () {
// Parent get the video channel for us
this.videoChannelService.videoChannelLoaded
.subscribe(videoChannel => this.videoChannel = videoChannel)
}
getVideoChannelDescription () {
if (this.videoChannel.description) return this.videoChannel.description
return 'No description'
}
}
|