fix(ng_for): fixed ng_for to pass a change detector ref to the pipe registry

This commit is contained in:
vsavkin 2015-07-15 13:25:38 -07:00
parent 7879761a41
commit 583c5ffcb5
1 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,8 @@ import {
ProtoViewRef,
Pipes,
LifecycleEvent,
Pipe
Pipe,
ChangeDetectorRef
} from 'angular2/angular2';
import {isPresent, isBlank} from 'angular2/src/facade/lang';
@ -46,11 +47,11 @@ export class NgFor {
_pipe: Pipe;
constructor(private viewContainer: ViewContainerRef, private protoViewRef: ProtoViewRef,
private pipes: Pipes) {}
private pipes: Pipes, private cdr: ChangeDetectorRef) {}
set ngForOf(value: any) {
this._ngForOf = value;
this._pipe = this.pipes.get("iterableDiff", value, null, this._pipe);
this._pipe = this.pipes.get("iterableDiff", value, this.cdr, this._pipe);
}
onCheck() {