1 import { Component, OnInit } from '@angular/core'
2 import { ActivatedRoute } from '@angular/router'
3 import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
4 import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
7 selector: 'my-video-channel-about',
8 templateUrl: './video-channel-about.component.html',
9 styleUrls: [ './video-channel-about.component.scss' ]
11 export class VideoChannelAboutComponent implements OnInit {
12 videoChannel: VideoChannel
15 protected route: ActivatedRoute,
16 private videoChannelService: VideoChannelService
20 // Parent get the video channel for us
21 this.videoChannelService.videoChannelLoaded
22 .subscribe(videoChannel => this.videoChannel = videoChannel)
25 getVideoChannelDescription () {
26 if (this.videoChannel.description) return this.videoChannel.description
28 return 'No description'