@ngx-ssr/platform
Version:
Install package
23 lines • 1.45 kB
JavaScript
import { Directive, Inject, TemplateRef, ViewContainerRef, } from '@angular/core';
import { IS_BROWSER_PLATFORM } from './tokens';
import * as i0 from "@angular/core";
export class IfIsBrowserDirective {
constructor(isBrowser, templateRef, viewContainer) {
if (isBrowser) {
viewContainer.createEmbeddedView(templateRef);
}
}
}
IfIsBrowserDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: IfIsBrowserDirective, deps: [{ token: IS_BROWSER_PLATFORM }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
IfIsBrowserDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.8", type: IfIsBrowserDirective, selector: "[ifIsBrowser]", ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.8", ngImport: i0, type: IfIsBrowserDirective, decorators: [{
type: Directive,
args: [{
// eslint-disable-next-line @angular-eslint/directive-selector
selector: '[ifIsBrowser]',
}]
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
type: Inject,
args: [IS_BROWSER_PLATFORM]
}] }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
//# sourceMappingURL=if-is-browser.directive.js.map