fix(PrivateComponentLoader): add the loader to the app injector

fixes #1063
This commit is contained in:
Victor Berchet
2015-03-24 10:19:05 +01:00
parent 19c1773133
commit 65d759316b
4 changed files with 49 additions and 0 deletions

View File

@ -17,6 +17,7 @@ import {StyleUrlResolver} from 'angular2/src/core/compiler/style_url_resolver';
import {ComponentUrlMapper} from 'angular2/src/core/compiler/component_url_mapper';
import {StyleInliner} from 'angular2/src/core/compiler/style_inliner';
import {CssProcessor} from 'angular2/src/core/compiler/css_processor';
import {PrivateComponentLoader} from 'angular2/src/core/compiler/private_component_loader';
import {reflector} from 'angular2/src/reflection/reflection';
import {DOM} from 'angular2/src/dom/dom_adapter';
@ -30,6 +31,8 @@ import {XHRImpl} from 'angular2/src/core/compiler/xhr/xhr_impl';
import {If} from 'angular2/directives';
import {BrowserDomAdapter} from 'angular2/src/dom/browser_adapter';
import {EventManager} from 'angular2/src/core/events/event_manager';
function setupReflector() {
// TODO: Put the general calls to reflector.register... in a shared file
// as they are needed in all benchmarks...
@ -190,6 +193,19 @@ function setupReflector() {
"annotations": []
});
reflector.registerType(EventManager, {
"factory": () => new EventManager([], null),
"parameters": [],
"annotations": []
});
reflector.registerType(PrivateComponentLoader, {
"factory": (compiler, strategy, eventMgr, reader) =>
new PrivateComponentLoader(compiler, strategy, eventMgr, reader),
"parameters": [[Compiler], [ShadowDomStrategy], [EventManager], [DirectiveMetadataReader]],
"annotations": []
});
reflector.registerGetters({
'value': (a) => a.value,
'left': (a) => a.left,