UNPKG

ng2-bootstrap

Version:
38 lines 1.63 kB
import { ChangeDetectionStrategy, Component } from '@angular/core'; import { BsDropdownState } from './bs-dropdown.state'; export var BsDropdownContainerComponent = (function () { function BsDropdownContainerComponent(_state) { var _this = this; this._state = _state; this.isOpen = false; this._subscription = _state.isOpenChange.subscribe(function (value) { _this.isOpen = value; }); } Object.defineProperty(BsDropdownContainerComponent.prototype, "direction", { get: function () { return this._state.direction; }, enumerable: true, configurable: true }); BsDropdownContainerComponent.prototype.ngOnDestroy = function () { this._subscription.unsubscribe(); }; BsDropdownContainerComponent.decorators = [ { type: Component, args: [{ selector: 'bs-dropdown-container', changeDetection: ChangeDetectionStrategy.OnPush, host: { style: 'display:block;position: absolute;' }, template: "\n <div [class.dropup]=\"direction === 'up'\"\n [class.dropdown]=\"direction === 'down'\"\n [class.show]=\"isOpen\"\n [class.open]=\"isOpen\"><ng-content></ng-content></div>\n " },] }, ]; /** @nocollapse */ BsDropdownContainerComponent.ctorParameters = function () { return [ { type: BsDropdownState, }, ]; }; return BsDropdownContainerComponent; }()); //# sourceMappingURL=bs-dropdown-container.component.js.map