fix(common): add link to trackBy docs (#13634)
This commit is contained in:
parent
0448e80704
commit
697690349f
|
@ -92,7 +92,8 @@ export class NgFor implements DoCheck, OnChanges {
|
||||||
@Input()
|
@Input()
|
||||||
set ngForTrackBy(fn: TrackByFn) {
|
set ngForTrackBy(fn: TrackByFn) {
|
||||||
if (typeof fn !== 'function') {
|
if (typeof fn !== 'function') {
|
||||||
throw new Error(`trackBy must be a function, but received ${JSON.stringify(fn)}`);
|
throw new Error(`trackBy must be a function, but received ${JSON.stringify(fn)}.
|
||||||
|
See https://angular.io/docs/ts/latest/api/common/index/NgFor-directive.html#!#change-propagation for more information.`);
|
||||||
}
|
}
|
||||||
this._trackByFn = fn;
|
this._trackByFn = fn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue