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

@ -1,7 +1,7 @@
import * as app from './index_common';
import {Component, Decorator, View, NgElement} from 'angular2/angular2';
import {Lexer, Parser, ChangeDetection, ChangeDetector} from 'angular2/change_detection';
import {Lexer, Parser, ChangeDetection, ChangeDetector, PipeRegistry, DynamicChangeDetection} from 'angular2/change_detection';
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle';
@ -248,6 +248,12 @@ function setup() {
"annotations": []
});
reflector.registerType(DynamicChangeDetection, {
"factory": (registry) => new DynamicChangeDetection(registry),
"parameters": [[PipeRegistry]],
"annotations": []
});
reflector.registerType(DirectDomRenderer, {
"factory": (renderCompiler, renderViewFactory, renderViewHydrator, shadowDomStrategy) =>
new DirectDomRenderer(renderCompiler, renderViewFactory, renderViewHydrator, shadowDomStrategy),