import * as tslib_1 from "tslib";
import { Directive, Input, ViewContainerRef } from '@angular/core';
/**
 * 将指定组件或者指令渲染到当前指令所在节点
 */
var AttachDirective = /** @class */ (function () {
    function AttachDirective(_viewContainerRef) {
        this._viewContainerRef = _viewContainerRef;
    }
    AttachDirective.prototype.ngOnInit = function () {
        this._viewContainerRef.createEmbeddedView(this.nbAttach.templateRef);
    };
    tslib_1.__decorate([
        Input(),
        tslib_1.__metadata("design:type", Object)
    ], AttachDirective.prototype, "nbAttach", void 0);
    AttachDirective = tslib_1.__decorate([
        Directive({
            selector: '[nbAttach]',
            exportAs: 'nbAttach'
        }),
        tslib_1.__metadata("design:paramtypes", [ViewContainerRef])
    ], AttachDirective);
    return AttachDirective;
}());
export { AttachDirective };
//# sourceMappingURL=attach.directive.js.map