aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/peertube-custom-tags/channel-miniature-markup.component.ts
blob: 25deafb80ff120eac19fbfe8798599c445edf43f (plain) (tree)
1
2
                                                        
                                                                     























                                                                
import { Component, Input, OnInit } from '@angular/core'
import { VideoChannel, VideoChannelService } from '../../shared-main'

/*
 * Markup component that creates a channel miniature only
*/

@Component({
  selector: 'my-channel-miniature-markup',
  templateUrl: 'channel-miniature-markup.component.html',
  styleUrls: [ 'channel-miniature-markup.component.scss' ]
})
export class ChannelMiniatureMarkupComponent implements OnInit {
  @Input() name: string

  channel: VideoChannel

  constructor (
    private channelService: VideoChannelService
  ) { }

  ngOnInit () {
    this.channelService.getVideoChannel(this.name)
      .subscribe(channel => this.channel = channel)
  }
}