X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions modules/angular2/src/router/hash_location_strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import {EventListener, History, Location} from 'angular2/src/core/facade/browser
* [hash fragment](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax)
* of the browser's URL.
*
* `HashLocationStrategy` is the default binding for {@link LocationStrategy}
* provided in {@link routerBindings} and {@link ROUTER_BINDINGS}.
*
* For instance, if you call `location.go('/foo')`, the browser's URL will become
* `example.com#/foo`.
*
Expand All @@ -38,7 +35,7 @@ import {EventListener, History, Location} from 'angular2/src/core/facade/browser
* }
*
* bootstrap(AppCmp, [
* routerBindings(AppCmp) // includes binding to HashLocationStrategy
* routerBindings(AppCmp)
* ]);
* ```
*/
Expand Down
10 changes: 5 additions & 5 deletions modules/angular2/src/router/path_location_strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import {LocationStrategy} from './location_strategy';
* [path](https://en.wikipedia.org/wiki/Uniform_Resource_Locator#Syntax) of the
* browser's URL.
*
* `PathLocationStrategy` is the default binding for {@link LocationStrategy}
* provided in {@link routerBindings} and {@link ROUTER_BINDINGS}.
*
* If you're using `PathLocationStrategy`, you must provide a binding for
* {@link APP_BASE_HREF} to a string representing the URL prefix that should
* be preserved when generating and recognizing URLs.
Expand All @@ -26,9 +29,7 @@ import {LocationStrategy} from './location_strategy';
* ROUTER_DIRECTIVES,
* routerBindings,
* RouteConfig,
* Location,
* LocationStrategy,
* PathLocationStrategy
* Location
* } from 'angular2/router';
*
* @Component({...})
Expand All @@ -43,8 +44,7 @@ import {LocationStrategy} from './location_strategy';
* }
*
* bootstrap(AppCmp, [
* routerBindings(AppCmp),
* bind(LocationStrategy).toClass(PathLocationStrategy),
* routerBindings(AppCmp), // includes binding to PathLocationStrategy
* bind(APP_BASE_HREF).toValue('/my/app')
* ]);
* ```
Expand Down
X Tutup