1 import { Component, Input, ViewChild } from '@angular/core'
2 import { VideoDetails } from '../../../shared/video/video-details.model'
3 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4 import { MarkdownService } from '@app/shared/renderer'
7 selector: 'my-video-support',
8 templateUrl: './video-support.component.html',
9 styleUrls: [ './video-support.component.scss' ]
11 export class VideoSupportComponent {
12 @Input() video: VideoDetails = null
14 @ViewChild('modal', { static: true }) modal: NgbModal
19 private markdownService: MarkdownService,
20 private modalService: NgbModal
24 this.modalService.open(this.modal, { centered: true })
26 this.markdownService.enhancedMarkdownToHTML(this.video.support)
27 .then(r => this.videoHTMLSupport = r)