Skip to content

Commit 583c5ff

Browse files
committed
fix(ng_for): fixed ng_for to pass a change detector ref to the pipe registry
1 parent 7879761 commit 583c5ff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

modules/angular2/src/directives/ng_for.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import {
55
ProtoViewRef,
66
Pipes,
77
LifecycleEvent,
8-
Pipe
8+
Pipe,
9+
ChangeDetectorRef
910
} from 'angular2/angular2';
1011
import {isPresent, isBlank} from 'angular2/src/facade/lang';
1112

@@ -46,11 +47,11 @@ export class NgFor {
4647
_pipe: Pipe;
4748

4849
constructor(private viewContainer: ViewContainerRef, private protoViewRef: ProtoViewRef,
49-
private pipes: Pipes) {}
50+
private pipes: Pipes, private cdr: ChangeDetectorRef) {}
5051

5152
set ngForOf(value: any) {
5253
this._ngForOf = value;
53-
this._pipe = this.pipes.get("iterableDiff", value, null, this._pipe);
54+
this._pipe = this.pipes.get("iterableDiff", value, this.cdr, this._pipe);
5455
}
5556

5657
onCheck() {

0 commit comments

Comments
 (0)