@@ -71,38 +71,37 @@ function _injectorBindings(appComponentType): List<Type | Binding | List<any>> {
7171 . toValue ( DOM . defaultDoc ( ) ) ,
7272 bind ( appComponentTypeToken ) . toValue ( appComponentType ) ,
7373 bind ( appComponentRefToken )
74- . toAsyncFactory ( ( dynamicComponentLoader , injector , testability , registry ) =>
75- {
74+ . toAsyncFactory (
75+ ( dynamicComponentLoader , injector , testability , registry ) => {
7676
77- // TODO(rado): investigate whether to support bindings on root component.
78- return dynamicComponentLoader . loadAsRoot ( appComponentType , null , injector )
79- . then ( ( componentRef ) => {
80- var domView = resolveInternalDomView ( componentRef . hostView . render ) ;
81- // We need to do this here to ensure that we create Testability and
82- // it's ready on the window for users.
83- registry . registerApplication ( domView . boundElements [ 0 ] , testability ) ;
77+ // TODO(rado): investigate whether to support bindings on root component.
78+ return dynamicComponentLoader . loadAsRoot ( appComponentType , null , injector )
79+ . then ( ( componentRef ) => {
80+ var domView = resolveInternalDomView ( componentRef . hostView . render ) ;
81+ // We need to do this here to ensure that we create Testability and
82+ // it's ready on the window for users.
83+ registry . registerApplication ( domView . boundElements [ 0 ] , testability ) ;
8484
85- return componentRef ;
86- } ) ;
87- } ,
88- [ DynamicComponentLoader , Injector , Testability , TestabilityRegistry ] ) ,
85+ return componentRef ;
86+ } ) ;
87+ } ,
88+ [ DynamicComponentLoader , Injector , Testability , TestabilityRegistry ] ) ,
8989
9090 bind ( appComponentType ) . toFactory ( ( ref ) => ref . instance , [ appComponentRefToken ] ) ,
9191 bind ( LifeCycle )
9292 . toFactory ( ( exceptionHandler ) => new LifeCycle ( exceptionHandler , null , assertionsEnabled ( ) ) ,
9393 [ ExceptionHandler ] ) ,
9494 bind ( EventManager )
9595 . toFactory (
96- ( ngZone ) =>
97- {
96+ ( ngZone ) => {
9897 var plugins =
9998 [ new HammerGesturesPlugin ( ) , new KeyEventsPlugin ( ) , new DomEventsPlugin ( ) ] ;
10099 return new EventManager ( plugins , ngZone ) ;
101100 } ,
102101 [ NgZone ] ) ,
103102 bind ( ShadowDomStrategy )
104103 . toFactory ( ( styleUrlResolver , doc ) =>
105- new EmulatedUnscopedShadowDomStrategy ( styleUrlResolver , doc . head ) ,
104+ new EmulatedUnscopedShadowDomStrategy ( styleUrlResolver , doc . head ) ,
106105 [ StyleUrlResolver , DOCUMENT_TOKEN ] ) ,
107106 DomRenderer ,
108107 DefaultDomCompiler ,
@@ -293,8 +292,7 @@ export function bootstrap(appComponentType: Type,
293292
294293 PromiseWrapper . then (
295294 appInjector . asyncGet ( appComponentRefToken ) ,
296- ( componentRef ) =>
297- {
295+ ( componentRef ) => {
298296 var appChangeDetector = internalView ( componentRef . hostView ) . changeDetector ;
299297 // retrieve life cycle: may have already been created if injected in root component
300298 var lc = appInjector . get ( LifeCycle ) ;
0 commit comments