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