UNPKG

fabric8-planner

Version:
42 lines 1.62 kB
import { Component, ViewChild } from '@angular/core'; import { ModalService } from '../../services/modal.service'; var ModalComponent = /** @class */ (function () { function ModalComponent(modalService) { var _this = this; this.modalService = modalService; this.eventListeners = []; this.eventListeners.push(this.modalService.getComponentObservable().subscribe(function (params) { _this.actionKey = params[3]; _this.open(params[0], params[1], params[2]); })); } ModalComponent.prototype.ngOnDestroy = function () { this.eventListeners.forEach(function (e) { return e.unsubscribe(); }); }; ModalComponent.prototype.open = function (title, message, buttonText) { this.title = title; this.message = message; this.buttonText = buttonText; this.modal.open(); }; ModalComponent.prototype.doAction = function () { this.modalService.doAction(this.actionKey); }; ModalComponent.decorators = [ { type: Component, args: [{ selector: 'osio-modal', template: require('./modal.component.html'), styles: [require('./modal.component.css').toString()] },] }, ]; /** @nocollapse */ ModalComponent.ctorParameters = function () { return [ { type: ModalService, }, ]; }; ModalComponent.propDecorators = { 'modal': [{ type: ViewChild, args: ['OSIOModal',] },], }; return ModalComponent; }()); export { ModalComponent }; //# sourceMappingURL=modal.component.js.map