refactor(change_detection): removed global change detection objects so it is possible to override pipe registry

This commit is contained in:
vsavkin
2015-04-13 09:50:02 -07:00
parent 233cb0f96a
commit 5408abca68
9 changed files with 35 additions and 29 deletions

View File

@ -9,8 +9,8 @@ import {
Parser,
ChangeDispatcher,
ChangeDetection,
dynamicChangeDetection,
jitChangeDetection,
DynamicChangeDetection,
JitChangeDetection,
BindingRecord,
DirectiveRecord,
DEFAULT
@ -261,7 +261,7 @@ export function main () {
// -- DYNAMIC
var ng2DynamicChangeDetector = setUpChangeDetection(dynamicChangeDetection, numberOfDetectors, object);
var ng2DynamicChangeDetector = setUpChangeDetection(new DynamicChangeDetection(null), numberOfDetectors, object);
runChangeDetectionReads(ng2DynamicChangeDetector, 1); //warmup
@ -281,7 +281,7 @@ export function main () {
// -- JIT
// Reenable when we have transformers for Dart
if (isJsObject({})) {
var ng2JitChangeDetector = setUpChangeDetection(jitChangeDetection, numberOfDetectors, object);
var ng2JitChangeDetector = setUpChangeDetection(new JitChangeDetection(null), numberOfDetectors, object);
runChangeDetectionReads(ng2JitChangeDetector, 1); //warmup

View File

@ -6,7 +6,7 @@ import {MapWrapper} from 'angular2/src/facade/collection';
import {DirectiveMetadata} from 'angular2/src/core/compiler/directive_metadata';
import {NativeShadowDomStrategy} from 'angular2/src/render/dom/shadow_dom/native_shadow_dom_strategy';
import {Parser, Lexer, ProtoRecordRange, dynamicChangeDetection} from 'angular2/change_detection';
import {Parser, Lexer, ProtoRecordRange, DynamicChangeDetection} from 'angular2/change_detection';
import {Compiler, CompilerCache} from 'angular2/src/core/compiler/compiler';
import {DirectiveMetadataReader} from 'angular2/src/core/compiler/directive_metadata_reader';
@ -82,7 +82,7 @@ export function main() {
new ComponentUrlMapper(),
urlResolver,
renderer,
new ProtoViewFactory(dynamicChangeDetection)
new ProtoViewFactory(new DynamicChangeDetection(null))
);
var templateNoBindings = createTemplateHtml('templateNoBindings', count);
var templateWithBindings = createTemplateHtml('templateWithBindings', count);