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

@ -2,7 +2,8 @@ import {bind} from 'angular2/di';
import {Compiler, CompilerCache} from 'angular2/src/core/compiler/compiler';
import {Reflector, reflector} from 'angular2/src/reflection/reflection';
import {Parser, Lexer, ChangeDetection, dynamicChangeDetection} from 'angular2/change_detection';
import {Parser, Lexer, ChangeDetection, DynamicChangeDetection,
PipeRegistry, defaultPipeRegistry} from 'angular2/change_detection';
import {ExceptionHandler} from 'angular2/src/core/exception_handler';
import {TemplateLoader} from 'angular2/src/render/dom/compiler/template_loader';
import {TemplateResolver} from 'angular2/src/core/compiler/template_resolver';
@ -90,7 +91,8 @@ function _getAppBindings() {
Compiler,
CompilerCache,
bind(TemplateResolver).toClass(MockTemplateResolver),
bind(ChangeDetection).toValue(dynamicChangeDetection),
bind(PipeRegistry).toValue(defaultPipeRegistry),
bind(ChangeDetection).toClass(DynamicChangeDetection),
TemplateLoader,
DynamicComponentLoader,
DirectiveMetadataReader,