refactor: change provide(...) for {provide: ...}

- provide() is deprecated,
- {} syntax is required by the offline compiler
This commit is contained in:
Victor Berchet
2016-06-02 17:30:40 -07:00
parent 27a47e7841
commit a6ad61d83e
128 changed files with 676 additions and 728 deletions

View File

@ -42,7 +42,7 @@ import {UrlChangeListener, PlatformLocation} from './platform_location';
*
* bootstrap(AppCmp, [
* ROUTER_PROVIDERS,
* provide(LocationStrategy, {useClass: HashLocationStrategy})
* {provide: LocationStrategy, useClass: HashLocationStrategy}
* ]);
* ```
*

View File

@ -56,7 +56,7 @@ export abstract class LocationStrategy {
*
* bootstrap(AppCmp, [
* ROUTER_PROVIDERS,
* provide(APP_BASE_HREF, {useValue: '/my/app'})
* {provide: APP_BASE_HREF, useValue: '/my/app'}
* ]);
* ```
* @stable

View File

@ -26,7 +26,7 @@ import {Location} from './location';
* ### Example
*
* ```
* import {Component, provide} from '@angular/core';
* import {Component} from '@angular/core';
* import {bootstrap} from '@angular/platform-browser/browser';
* import {
* Location,
@ -50,7 +50,7 @@ import {Location} from './location';
*
* bootstrap(AppCmp, [
* ROUTER_PROVIDERS, // includes binding to PathLocationStrategy
* provide(APP_BASE_HREF, {useValue: '/my/app'})
* {provide: APP_BASE_HREF, useValue: '/my/app'}
* ]);
* ```
*