]>
Commit | Line | Data |
---|---|---|
07fa4c97 C |
1 | import { Component, Input, ViewChild } from '@angular/core' |
2 | import { MarkdownService } from '@app/videos/shared' | |
3 | ||
07fa4c97 | 4 | import { VideoDetails } from '../../../shared/video/video-details.model' |
63347a0f | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
07fa4c97 C |
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 | ||
63347a0f | 15 | @ViewChild('modal') modal: NgbModal |
07fa4c97 C |
16 | |
17 | videoHTMLSupport = '' | |
18 | ||
63347a0f C |
19 | constructor ( |
20 | private markdownService: MarkdownService, | |
21 | private modalService: NgbModal | |
23db998f | 22 | ) { } |
07fa4c97 C |
23 | |
24 | show () { | |
53055a11 | 25 | this.videoHTMLSupport = this.markdownService.enhancedMarkdownToHTML(this.video.support) |
63347a0f | 26 | this.modalService.open(this.modal) |
07fa4c97 C |
27 | } |
28 | } |