blob: 0058172f21f10fe355709d29b2f1bb5851b98a24 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import { Component, Input, ViewChild } from '@angular/core'
import { VideoDetails } from '../../../shared/video/video-details.model'
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
import { MarkdownService } from '@app/shared/renderer'
@Component({
selector: 'my-video-support',
templateUrl: './video-support.component.html',
styleUrls: [ './video-support.component.scss' ]
})
export class VideoSupportComponent {
@Input() video: VideoDetails = null
@ViewChild('modal', { static: true }) modal: NgbModal
videoHTMLSupport = ''
constructor (
private markdownService: MarkdownService,
private modalService: NgbModal
) { }
show () {
this.modalService.open(this.modal, { centered: true })
this.markdownService.enhancedMarkdownToHTML(this.video.support)
.then(r => this.videoHTMLSupport = r)
}
}
|