1
0
Fork 0
peertube/client/src/app/+video-channels/video-channels.component.ts

25 lines
803 B
TypeScript
Raw Normal View History

2018-04-25 14:56:13 +00:00
import { Component, OnInit } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import { VideoChannel } from '@app/shared/video-channel/video-channel.model'
import { VideoChannelService } from '@app/shared/video-channel/video-channel.service'
@Component({
templateUrl: './video-channels.component.html',
styleUrls: [ './video-channels.component.scss' ]
})
export class VideoChannelsComponent implements OnInit {
videoChannel: VideoChannel
constructor (
private route: ActivatedRoute,
private videoChannelService: VideoChannelService
) {}
ngOnInit () {
const videoChannelId = this.route.snapshot.params['videoChannelId']
this.videoChannelService.getVideoChannel(videoChannelId)
.subscribe(videoChannel => this.videoChannel = videoChannel)
}
}