parent
522e4ea898
commit
3b9553bb17
@ -134,8 +134,21 @@ export class NgForOf<T> implements DoCheck {
|
|||||||
this._ngForOfDirty = true;
|
this._ngForOfDirty = true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* A function that customizes the default tracking algorithm.
|
* A function that defines how to track changes for items in the iterable.
|
||||||
* When supplied, Angular tracks changes by the return value of the function.
|
*
|
||||||
|
* When items are added, moved, or removed in the iterable,
|
||||||
|
* the directive must re-render the appropriate DOM nodes.
|
||||||
|
* To minimize churn in the DOM, only nodes that have changed
|
||||||
|
* are re-rendered.
|
||||||
|
*
|
||||||
|
* By default, the change detector assumes that
|
||||||
|
* the object instance identifies the node in the iterable.
|
||||||
|
* When this function is supplied, the directive uses
|
||||||
|
* the result of calling this function to identify the item node,
|
||||||
|
* rather than the identity of the object itself.
|
||||||
|
*
|
||||||
|
* The function receives two inputs,
|
||||||
|
* the iteration index and the node object ID.
|
||||||
*/
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
set ngForTrackBy(fn: TrackByFunction<T>) {
|
set ngForTrackBy(fn: TrackByFunction<T>) {
|
||||||
@ -164,9 +177,8 @@ export class NgForOf<T> implements DoCheck {
|
|||||||
private _differs: IterableDiffers) {}
|
private _differs: IterableDiffers) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The [template reference variable](guide/template-syntax#template-reference-variables--var-)
|
* A reference to the template that is stamped out for each item in the iterable.
|
||||||
* for the expanded directive.
|
* @see [template reference variable](guide/template-syntax#template-reference-variables--var-)
|
||||||
* Compare [template input variable](guide/structural-directives#template-input-variable)
|
|
||||||
*/
|
*/
|
||||||
@Input()
|
@Input()
|
||||||
set ngForTemplate(value: TemplateRef<NgForOfContext<T>>) {
|
set ngForTemplate(value: TemplateRef<NgForOfContext<T>>) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user