@@ -9,8 +9,11 @@ import {bootstrap, Component, Template, TemplateConfig, ViewPort, Compiler}
99import { reflector } from 'angular2/src/reflection/reflection' ;
1010import { CompilerCache } from 'angular2/src/core/compiler/compiler' ;
1111import { DirectiveMetadataReader } from 'angular2/src/core/compiler/directive_metadata_reader' ;
12+ import { ShadowDomStrategy , NativeShadowDomStrategy } from 'angular2/src/core/compiler/shadow_dom_strategy' ;
1213import { TemplateLoader } from 'angular2/src/core/compiler/template_loader' ;
1314import { LifeCycle } from 'angular2/src/core/life_cycle/life_cycle' ;
15+ import { XHR } from 'angular2/src/core/compiler/xhr/xhr' ;
16+ import { XHRImpl } from 'angular2/src/core/compiler/xhr/xhr_impl' ;
1417
1518import { NgIf , NgRepeat } from 'angular2/directives' ;
1619import { App , setupReflectorForApp } from './app' ;
@@ -169,9 +172,11 @@ export function setupReflectorForAngular() {
169172 } ) ;
170173
171174 reflector . registerType ( Compiler , {
172- 'factory' : ( changeDetection , templateLoader , reader , parser , compilerCache ) => new Compiler ( changeDetection , templateLoader , reader , parser , compilerCache ) ,
173- 'parameters' : [ [ ChangeDetection ] , [ TemplateLoader ] , [ DirectiveMetadataReader ] , [ Parser ] , [ CompilerCache ] ] ,
174- 'annotations' : [ ]
175+ "factory" : ( changeDetection , templateLoader , reader , parser , compilerCache , shadowDomStrategy ) =>
176+ new Compiler ( changeDetection , templateLoader , reader , parser , compilerCache , shadowDomStrategy ) ,
177+ "parameters" : [ [ ChangeDetection ] , [ TemplateLoader ] , [ DirectiveMetadataReader ] , [ Parser ] ,
178+ [ CompilerCache ] , [ ShadowDomStrategy ] ] ,
179+ "annotations" : [ ]
175180 } ) ;
176181
177182 reflector . registerType ( CompilerCache , {
@@ -187,9 +192,15 @@ export function setupReflectorForAngular() {
187192 } ) ;
188193
189194 reflector . registerType ( TemplateLoader , {
190- 'factory' : ( ) => new TemplateLoader ( ) ,
191- 'parameters' : [ ] ,
192- 'annotations' : [ ]
195+ "factory" : ( xhr ) => new TemplateLoader ( xhr ) ,
196+ "parameters" : [ [ XHR ] ] ,
197+ "annotations" : [ ]
198+ } ) ;
199+
200+ reflector . registerType ( XHR , {
201+ "factory" : ( ) => new XHRImpl ( ) ,
202+ "parameters" : [ ] ,
203+ "annotations" : [ ]
193204 } ) ;
194205
195206 reflector . registerType ( DirectiveMetadataReader , {
@@ -209,4 +220,11 @@ export function setupReflectorForAngular() {
209220 "parameters" : [ [ ChangeDetector ] ] ,
210221 "annotations" : [ ]
211222 } ) ;
223+
224+ reflector . registerType ( ShadowDomStrategy , {
225+ "factory" : ( ) => new NativeShadowDomStrategy ( ) ,
226+ "parameters" : [ ] ,
227+ "annotations" : [ ]
228+ } ) ;
229+
212230}
0 commit comments