UNPKG

angular2-mdl

Version:

Angular 2 components, directives and styles based on material design lite https://getmdl.io.

36 lines 1.31 kB
import { Component, Input, Output, EventEmitter } from '@angular/core'; import { MdlDialogService } from './mdl-dialog.service'; export var MdlAlertComponent = (function () { function MdlAlertComponent(mdlDialogService) { this.mdlDialogService = mdlDialogService; this.confirmed = new EventEmitter(); } MdlAlertComponent.prototype.show = function () { var _this = this; this.mdlDialogService.alert(this.message, this.okText, this.title).subscribe(function () { _this.confirmed.emit(); }); }; MdlAlertComponent.decorators = [ { type: Component, args: [{ selector: 'mdl-alert', host: { '[style.display]': '"none"' }, template: "\n ", exportAs: 'mdlAlert' },] }, ]; /** @nocollapse */ MdlAlertComponent.ctorParameters = function () { return [ { type: MdlDialogService, }, ]; }; MdlAlertComponent.propDecorators = { 'title': [{ type: Input },], 'message': [{ type: Input },], 'okText': [{ type: Input },], 'confirmed': [{ type: Output },], }; return MdlAlertComponent; }()); //# sourceMappingURL=mdl-alert.component.js.map