From c17c33ca14c0354834d2e124caac80e5a2ca057d Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 29 Oct 2015 07:30:05 -0500 Subject: [PATCH] docs(router): Updated example for hash location strategy Closes #5010 --- modules/angular2/src/router/hash_location_strategy.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/angular2/src/router/hash_location_strategy.ts b/modules/angular2/src/router/hash_location_strategy.ts index 283242ddd5..f698312834 100644 --- a/modules/angular2/src/router/hash_location_strategy.ts +++ b/modules/angular2/src/router/hash_location_strategy.ts @@ -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()