@@ -50,18 +50,18 @@ import {Compiler_} from "./linker/compiler";
5050 * running on the page.
5151 */
5252export function platformBindings ( ) : Array < Type | Provider | any [ ] > {
53- return [ provide ( Reflector , { asValue : reflector } ) , TestabilityRegistry ] ;
53+ return [ provide ( Reflector , { useValue : reflector } ) , TestabilityRegistry ] ;
5454}
5555
5656/**
5757 * Construct providers specific to an individual root component.
5858 */
5959function _componentProviders ( appComponentType : Type ) : Array < Type | Provider | any [ ] > {
6060 return [
61- provide ( APP_COMPONENT , { asValue : appComponentType } ) ,
61+ provide ( APP_COMPONENT , { useValue : appComponentType } ) ,
6262 provide ( APP_COMPONENT_REF_PROMISE ,
6363 {
64- asFactory : ( dynamicComponentLoader , injector : Injector ) => {
64+ useFactory : ( dynamicComponentLoader , injector : Injector ) => {
6565 // TODO(rado): investigate whether to support bindings on root component.
6666 return dynamicComponentLoader . loadAsRoot ( appComponentType , null , injector )
6767 . then ( ( componentRef ) => {
@@ -77,7 +77,7 @@ function _componentProviders(appComponentType: Type): Array<Type | Provider | an
7777 } ) ,
7878 provide ( appComponentType ,
7979 {
80- asFactory : ( p : Promise < any > ) => p . then ( ref => ref . instance ) ,
80+ useFactory : ( p : Promise < any > ) => p . then ( ref => ref . instance ) ,
8181 deps : [ APP_COMPONENT_REF_PROMISE ]
8282 } ) ,
8383 ] ;
@@ -89,24 +89,24 @@ function _componentProviders(appComponentType: Type): Array<Type | Provider | an
8989 */
9090export function applicationCommonBindings ( ) : Array < Type | Provider | any [ ] > {
9191 return [
92- provide ( Compiler , { asClass : Compiler_ } ) ,
92+ provide ( Compiler , { useClass : Compiler_ } ) ,
9393 APP_ID_RANDOM_PROVIDER ,
9494 AppViewPool ,
95- provide ( APP_VIEW_POOL_CAPACITY , { asValue : 10000 } ) ,
96- provide ( AppViewManager , { asClass : AppViewManager_ } ) ,
95+ provide ( APP_VIEW_POOL_CAPACITY , { useValue : 10000 } ) ,
96+ provide ( AppViewManager , { useClass : AppViewManager_ } ) ,
9797 AppViewManagerUtils ,
9898 AppViewListener ,
9999 ProtoViewFactory ,
100100 ViewResolver ,
101101 DEFAULT_PIPES ,
102- provide ( IterableDiffers , { asValue : defaultIterableDiffers } ) ,
103- provide ( KeyValueDiffers , { asValue : defaultKeyValueDiffers } ) ,
102+ provide ( IterableDiffers , { useValue : defaultIterableDiffers } ) ,
103+ provide ( KeyValueDiffers , { useValue : defaultKeyValueDiffers } ) ,
104104 DirectiveResolver ,
105105 PipeResolver ,
106- provide ( DynamicComponentLoader , { asClass : DynamicComponentLoader_ } ) ,
106+ provide ( DynamicComponentLoader , { useClass : DynamicComponentLoader_ } ) ,
107107 provide ( LifeCycle ,
108108 {
109- asFactory : ( exceptionHandler ) => new LifeCycle_ ( null , assertionsEnabled ( ) ) ,
109+ useFactory : ( exceptionHandler ) => new LifeCycle_ ( null , assertionsEnabled ( ) ) ,
110110 deps : [ ExceptionHandler ]
111111 } )
112112 ] ;
@@ -236,8 +236,8 @@ export class PlatformRef_ extends PlatformRef {
236236 var injector : Injector ;
237237 var app : ApplicationRef ;
238238 zone . run ( ( ) => {
239- providers . push ( provide ( NgZone , { asValue : zone } ) ) ;
240- providers . push ( provide ( ApplicationRef , { asFactory : ( ) : ApplicationRef => app , deps : [ ] } ) ) ;
239+ providers . push ( provide ( NgZone , { useValue : zone } ) ) ;
240+ providers . push ( provide ( ApplicationRef , { useFactory : ( ) : ApplicationRef => app , deps : [ ] } ) ) ;
241241
242242 var exceptionHandler ;
243243 try {
@@ -297,7 +297,7 @@ export abstract class ApplicationRef {
297297 * ```
298298 * var app = platform.application([applicationCommonBindings(), applicationDomBindings()];
299299 * app.bootstrap(FirstRootComponent);
300- * app.bootstrap(SecondRootComponent, [provide(OverrideBinding, {asClass : OverriddenBinding})]);
300+ * app.bootstrap(SecondRootComponent, [provide(OverrideBinding, {useClass : OverriddenBinding})]);
301301 * ```
302302 */
303303 abstract bootstrap ( componentType : Type , bindings ?: Array < Type | Provider | any [ ] > ) :
0 commit comments