/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Injector, OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * @ngModule CommonModule * * @description * * Inserts an embedded view from a prepared `TemplateRef`. * * You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`. * `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding * by the local template `let` declarations. * * @usageNotes * ``` * * ``` * * Using the key `$implicit` in the context object will set its value as default. * * ### Example * * {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'} * * @publicApi */ export declare class NgTemplateOutlet implements OnChanges { private _viewContainerRef; private _viewRef; /** * A context object to attach to the {@link EmbeddedViewRef}. This should be an * object, the object's keys will be available for binding by the local template `let` * declarations. * Using the key `$implicit` in the context object will set its value as default. */ ngTemplateOutletContext: C | null; /** * A string defining the template reference and optionally the context object for the template. */ ngTemplateOutlet: TemplateRef | null; /** Injector to be used within the embedded view. */ ngTemplateOutletInjector: Injector | null; constructor(_viewContainerRef: ViewContainerRef); ngOnChanges(changes: SimpleChanges): void; /** * We need to re-create existing embedded view if either is true: * - the outlet changed. * - the injector changed. */ private _shouldRecreateView; /** * For a given outlet instance, we create a proxy object that delegates * to the user-specified context. This allows changing, or swapping out * the context object completely without having to destroy/re-create the view. */ private _createContextForwardProxy; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never>; } declare const NgTemplateOutlet_Listeners:[]; declare const NgTemplateOutlet_Properties:[];