]>
Commit | Line | Data |
---|---|---|
1 | import { Component, Input, ViewChild } from '@angular/core' | |
2 | import { ModalDirective } from 'ngx-bootstrap/modal' | |
3 | import { VideoDetails } from '../../shared/video/video-details.model' | |
4 | ||
5 | @Component({ | |
6 | selector: 'my-video-download', | |
7 | templateUrl: './video-download.component.html', | |
8 | styleUrls: [ './video-download.component.scss' ] | |
9 | }) | |
10 | export class VideoDownloadComponent { | |
11 | @Input() video: VideoDetails = null | |
12 | ||
13 | @ViewChild('modal') modal: ModalDirective | |
14 | ||
15 | constructor () { | |
16 | // empty | |
17 | } | |
18 | ||
19 | show () { | |
20 | this.modal.show() | |
21 | } | |
22 | ||
23 | hide () { | |
24 | this.modal.hide() | |
25 | } | |
26 | } |