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