feat(change_detection): pass binding propagation config to pipe registry

This commit is contained in:
vsavkin
2015-02-27 13:38:25 -08:00
parent dd235f38a3
commit 8d85b839b6
21 changed files with 69 additions and 37 deletions

View File

@ -1,28 +0,0 @@
import {ChangeDetector, CHECK_ONCE, DETACHED, CHECK_ALWAYS} from 'angular2/change_detection';
/**
* @publicModule angular2/angular2
*/
export class BindingPropagationConfig {
_cd:ChangeDetector;
constructor(cd:ChangeDetector) {
this._cd = cd;
}
shouldBePropagated() {
this._cd.mode = CHECK_ONCE;
}
shouldBePropagatedFromRoot() {
this._cd.markPathToRootAsCheckOnce();
}
shouldNotPropagate() {
this._cd.mode = DETACHED;
}
shouldAlwaysPropagate() {
this._cd.mode = CHECK_ALWAYS;
}
}

View File

@ -8,7 +8,7 @@ import * as viewModule from 'angular2/src/core/compiler/view';
import {ViewContainer} from 'angular2/src/core/compiler/view_container';
import {NgElement} from 'angular2/src/core/dom/element';
import {Directive, onChange, onDestroy} from 'angular2/src/core/annotations/annotations';
import {BindingPropagationConfig} from 'angular2/src/core/compiler/binding_propagation_config';
import {BindingPropagationConfig} from 'angular2/change_detection';
import * as pclModule from 'angular2/src/core/compiler/private_component_location';
import {setterFactory} from './property_setter_factory';

View File

@ -2,10 +2,9 @@ import {DOM} from 'angular2/src/dom/dom_adapter';
import {Promise} from 'angular2/src/facade/async';
import {ListWrapper, MapWrapper, Map, StringMapWrapper, List} from 'angular2/src/facade/collection';
import {AST, Locals, ChangeDispatcher, ProtoChangeDetector, ChangeDetector,
ChangeRecord, BindingRecord, uninitialized} from 'angular2/change_detection';
ChangeRecord, BindingRecord, BindingPropagationConfig, uninitialized} from 'angular2/change_detection';
import {ProtoElementInjector, ElementInjector, PreBuiltObjects} from './element_injector';
import {BindingPropagationConfig} from './binding_propagation_config';
import {ElementBinder} from './element_binder';
import {DirectiveMetadata} from './directive_metadata';
import {SetterFn} from 'angular2/src/reflection/types';