igniteui-angular-core
Version:
Ignite UI Angular Core logic used in multiple UI components.
66 lines (65 loc) • 4.05 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
var IgxTemplateContentComponent = /** @class */ /*@__PURE__*/ (function () {
function IgxTemplateContentComponent(_changeDetectorRef, viewContainer) {
this._changeDetectorRef = _changeDetectorRef;
this.viewContainer = viewContainer;
this._template = null;
this._context = null;
}
Object.defineProperty(IgxTemplateContentComponent.prototype, "template", {
get: function () {
return this._template;
},
set: function (value) {
this._template = value;
if (this._context != null) {
this._changeDetectorRef.detectChanges();
}
},
enumerable: false,
configurable: true
});
Object.defineProperty(IgxTemplateContentComponent.prototype, "context", {
get: function () {
return this._context;
},
set: function (value) {
if (this._context == null && value == null) {
return;
}
this._context = value;
this._changeDetectorRef.detectChanges();
},
enumerable: false,
configurable: true
});
IgxTemplateContentComponent.prototype.markChanged = function () {
this._changeDetectorRef.detectChanges();
};
IgxTemplateContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxTemplateContentComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
IgxTemplateContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: IgxTemplateContentComponent, selector: "igx-template-content", inputs: { template: "template", context: "context" }, host: { classAttribute: "ig-template-content igx-template-content" }, ngImport: i0, template: "\n <ng-template #defaultTemplate>\n <div></div>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"template ? template : defaultTemplate; context: context\">\n </ng-container>\n ", isInline: true, styles: ["\n :host {\n display: block;\n }\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
return IgxTemplateContentComponent;
}());
export { IgxTemplateContentComponent };
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: IgxTemplateContentComponent, decorators: [{
type: Component,
args: [{
selector: 'igx-template-content',
changeDetection: ChangeDetectionStrategy.OnPush,
template: "\n <ng-template #defaultTemplate>\n <div></div>\n </ng-template>\n <ng-container *ngTemplateOutlet=\"template ? template : defaultTemplate; context: context\">\n </ng-container>\n ",
host: { class: "ig-template-content igx-template-content" },
styles: ["\n :host {\n display: block;\n }\n"]
}]
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { template: [{
type: Input
}], context: [{
type: Input
}] } });