docs(router): Updated example for hash location strategy

Closes #5010
This commit is contained in:
Brandon Roberts 2015-10-29 07:30:05 -05:00 committed by Brandon
parent a87c5d989c
commit c17c33ca14
1 changed files with 8 additions and 3 deletions

View File

@ -15,12 +15,14 @@ import {EventListener, History, Location} from 'angular2/src/core/facade/browser
* ### Example
*
* ```
* import {Component, View} from 'angular2/angular2';
* import {Component, provide} from 'angular2/angular2';
* import {
* ROUTER_DIRECTIVES,
* ROUTER_PROVIDERS,
* RouteConfig,
* Location
* Location,
* LocationStrategy,
* HashLocationStrategy
* } from 'angular2/router';
*
* @Component({directives: [ROUTER_DIRECTIVES]})
@ -33,7 +35,10 @@ import {EventListener, History, Location} from 'angular2/src/core/facade/browser
* }
* }
*
* bootstrap(AppCmp, [ROUTER_PROVIDERS]);
* bootstrap(AppCmp, [
* ROUTER_PROVIDERS,
* provide(LocationStrategy, {useClass: HashLocationStrategy})
* ]);
* ```
*/
@Injectable()