aboutsummaryrefslogtreecommitdiffstats
path: root/src/angular/modals/modal-button.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/angular/modals/modal-button.component.ts')
-rw-r--r--src/angular/modals/modal-button.component.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/angular/modals/modal-button.component.ts b/src/angular/modals/modal-button.component.ts
index 4fa5b7c..07f81dd 100644
--- a/src/angular/modals/modal-button.component.ts
+++ b/src/angular/modals/modal-button.component.ts
@@ -1,7 +1,6 @@
-import { Component, Input, HostListener } from "@angular/core";
+import { Component, Input, HostListener, EventEmitter, Output } from "@angular/core";
import { ButtonComponent } from "../buttons/button.component";
-import { ModalService } from "./modal.service";
-import template from "./../buttons/button.component.html";
+import { template } from "./../buttons/button.component.html";
@Component({
selector: "sdc-modal-button",
@@ -12,16 +11,17 @@ export class ModalButtonComponent extends ButtonComponent {
@Input() public id?: string;
@Input() public callback: Function;
@Input() public closeModal: boolean;
+ @Output() closeModalEvent: EventEmitter<any> = new EventEmitter<any>();
@HostListener('click') invokeCallback = (): void => {
if (this.callback) {
this.callback();
}
if (this.closeModal) {
- this.modalService.closeModal();
+ this.closeModalEvent.emit();
}
}
- constructor(private modalService: ModalService) {
+ constructor() {
super();
this.closeModal = false;
}