]>
Commit | Line | Data |
---|---|---|
11fdf7f2 TL |
1 | import { Component, EventEmitter, Input, Output } from '@angular/core'; |
2 | ||
f67539c2 | 3 | import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; |
11fdf7f2 TL |
4 | |
5 | @Component({ | |
6 | selector: 'cd-modal', | |
7 | templateUrl: './modal.component.html', | |
8 | styleUrls: ['./modal.component.scss'] | |
9 | }) | |
10 | export class ModalComponent { | |
11 | @Input() | |
f67539c2 | 12 | modalRef: NgbActiveModal; |
11fdf7f2 TL |
13 | |
14 | /** | |
15 | * Should be a function that is triggered when the modal is hidden. | |
16 | */ | |
17 | @Output() | |
18 | hide = new EventEmitter(); | |
19 | ||
11fdf7f2 | 20 | close() { |
f67539c2 | 21 | this.modalRef?.close(); |
11fdf7f2 TL |
22 | this.hide.emit(); |
23 | } | |
24 | } |