]>
Commit | Line | Data |
---|---|---|
df98563e | 1 | import { Component, Input, ViewChild } from '@angular/core' |
cf02fbfb | 2 | |
df98563e | 3 | import { ModalDirective } from 'ngx-bootstrap/modal' |
cf02fbfb | 4 | |
df98563e | 5 | import { Video } from '../shared' |
cf02fbfb C |
6 | |
7 | @Component({ | |
a96aed15 C |
8 | selector: 'my-video-download', |
9 | templateUrl: './video-download.component.html', | |
10 | styles: [ '.resolution-block { margin-top: 20px; }' ] | |
cf02fbfb | 11 | }) |
a96aed15 | 12 | export class VideoDownloadComponent { |
df98563e | 13 | @Input() video: Video = null |
cf02fbfb | 14 | |
df98563e | 15 | @ViewChild('modal') modal: ModalDirective |
cf02fbfb | 16 | |
df98563e | 17 | constructor () { |
cf02fbfb C |
18 | // empty |
19 | } | |
20 | ||
df98563e C |
21 | show () { |
22 | this.modal.show() | |
cf02fbfb C |
23 | } |
24 | ||
df98563e C |
25 | hide () { |
26 | this.modal.hide() | |
cf02fbfb C |
27 | } |
28 | } |