feat(application): move classes to the application level injector

fixes #649
This commit is contained in:
Victor Berchet 2015-02-16 10:21:54 +01:00
parent 695b4ebbc7
commit 53d5f36557
1 changed files with 10 additions and 10 deletions

View File

@ -24,16 +24,6 @@ var _rootInjector: Injector;
// Contains everything that is safe to share between applications. // Contains everything that is safe to share between applications.
var _rootBindings = [ var _rootBindings = [
bind(Reflector).toValue(reflector), bind(Reflector).toValue(reflector),
bind(ChangeDetection).toValue(dynamicChangeDetection),
Compiler,
CompilerCache,
TemplateLoader,
TemplateResolver,
DirectiveMetadataReader,
Parser,
Lexer,
bind(ShadowDomStrategy).toValue(new NativeShadowDomStrategy()),
bind(XHR).toValue(new XHRImpl()),
]; ];
export var appViewToken = new OpaqueToken('AppView'); export var appViewToken = new OpaqueToken('AppView');
@ -87,6 +77,16 @@ function _injectorBindings(appComponentType): List<Binding> {
var plugins = [new HammerGesturesPlugin()]; var plugins = [new HammerGesturesPlugin()];
return new EventManager(plugins, zone); return new EventManager(plugins, zone);
}, [VmTurnZone]), }, [VmTurnZone]),
bind(ShadowDomStrategy).toValue(new NativeShadowDomStrategy()),
Compiler,
CompilerCache,
TemplateResolver,
bind(ChangeDetection).toValue(dynamicChangeDetection),
TemplateLoader,
DirectiveMetadataReader,
Parser,
Lexer,
bind(XHR).toValue(new XHRImpl()),
]; ];
} }