From 170726f523ff48f89da45473fc53ca54784f43dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 25 Apr 2018 16:56:13 +0200 Subject: Implement video channel views --- .../+video-channels/video-channels.component.ts | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 client/src/app/+video-channels/video-channels.component.ts (limited to 'client/src/app/+video-channels/video-channels.component.ts') diff --git a/client/src/app/+video-channels/video-channels.component.ts b/client/src/app/+video-channels/video-channels.component.ts new file mode 100644 index 000000000..5eca64fb5 --- /dev/null +++ b/client/src/app/+video-channels/video-channels.component.ts @@ -0,0 +1,24 @@ +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) + } +} -- cgit v1.2.3