1
|
/**
|
2
|
* @license
|
3
|
* Copyright Google Inc. All Rights Reserved.
|
4
|
*
|
5
|
* Use of this source code is governed by an MIT-style license that can be
|
6
|
* found in the LICENSE file at https://angular.io/license
|
7
|
*/
|
8
|
import { OnChanges, SimpleChanges, TemplateRef, ViewContainerRef } from '@angular/core';
|
9
|
/**
|
10
|
* @ngModule CommonModule
|
11
|
*
|
12
|
* @whatItDoes Inserts an embedded view from a prepared `TemplateRef`
|
13
|
*
|
14
|
* @howToUse
|
15
|
* ```
|
16
|
* <ng-container *ngTemplateOutlet="templateRefExp; context: contextExp"></ng-container>
|
17
|
* ```
|
18
|
*
|
19
|
* @description
|
20
|
*
|
21
|
* You can attach a context object to the `EmbeddedViewRef` by setting `[ngTemplateOutletContext]`.
|
22
|
* `[ngTemplateOutletContext]` should be an object, the object's keys will be available for binding
|
23
|
* by the local template `let` declarations.
|
24
|
*
|
25
|
* Note: using the key `$implicit` in the context object will set it's value as default.
|
26
|
*
|
27
|
* ## Example
|
28
|
*
|
29
|
* {@example common/ngTemplateOutlet/ts/module.ts region='NgTemplateOutlet'}
|
30
|
*
|
31
|
* @experimental
|
32
|
*/
|
33
|
export declare class NgTemplateOutlet implements OnChanges {
|
34
|
private _viewContainerRef;
|
35
|
private _viewRef;
|
36
|
ngTemplateOutletContext: Object;
|
37
|
ngTemplateOutlet: TemplateRef<any>;
|
38
|
constructor(_viewContainerRef: ViewContainerRef);
|
39
|
/**
|
40
|
* @deprecated v4.0.0 - Renamed to ngTemplateOutletContext.
|
41
|
*/
|
42
|
ngOutletContext: Object;
|
43
|
ngOnChanges(changes: SimpleChanges): void;
|
44
|
}
|