]>
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({ | |
8 | selector: 'my-video-magnet', | |
9 | templateUrl: './video-magnet.component.html' | |
10 | }) | |
11 | export class VideoMagnetComponent { | |
df98563e | 12 | @Input() video: Video = null |
cf02fbfb | 13 | |
df98563e | 14 | @ViewChild('modal') modal: ModalDirective |
cf02fbfb | 15 | |
df98563e | 16 | constructor () { |
cf02fbfb C |
17 | // empty |
18 | } | |
19 | ||
df98563e C |
20 | show () { |
21 | this.modal.show() | |
cf02fbfb C |
22 | } |
23 | ||
df98563e C |
24 | hide () { |
25 | this.modal.hide() | |
cf02fbfb C |
26 | } |
27 | } |