UNPKG

ng2-bootstrap

Version:
58 lines 2.14 kB
import { Component, ElementRef, Renderer } from '@angular/core'; import { ClassName } from './modal-options.class'; import { isBs3 } from '../utils/ng2-bootstrap-config'; export var ModalBackdropOptions = (function () { function ModalBackdropOptions(options) { this.animate = true; Object.assign(this, options); } return ModalBackdropOptions; }()); /** This component will be added as background layout for modals if enabled */ export var ModalBackdropComponent = (function () { function ModalBackdropComponent(element, renderer) { this._isShown = false; this.element = element; this.renderer = renderer; } Object.defineProperty(ModalBackdropComponent.prototype, "isAnimated", { get: function () { return this._isAnimated; }, set: function (value) { this._isAnimated = value; this.renderer.setElementClass(this.element.nativeElement, "" + ClassName.FADE, value); }, enumerable: true, configurable: true }); Object.defineProperty(ModalBackdropComponent.prototype, "isShown", { get: function () { return this._isShown; }, set: function (value) { this._isShown = value; this.renderer.setElementClass(this.element.nativeElement, "" + ClassName.IN, value); if (!isBs3()) { this.renderer.setElementClass(this.element.nativeElement, "" + ClassName.SHOW, value); } }, enumerable: true, configurable: true }); ModalBackdropComponent.decorators = [ { type: Component, args: [{ selector: 'bs-modal-backdrop', template: '', // tslint:disable-next-line host: { 'class': ClassName.BACKDROP } },] }, ]; /** @nocollapse */ ModalBackdropComponent.ctorParameters = function () { return [ { type: ElementRef, }, { type: Renderer, }, ]; }; return ModalBackdropComponent; }()); //# sourceMappingURL=modal-backdrop.component.js.map