LocationStrategy

export class LocationStrategy

exported from angular2/router defined in angular2/src/router/location_strategy.ts (line 2)

LocationStrategy is responsible for representing and reading route state from the browser's URL. Angular provides two strategies: HashLocationStrategy (default) and PathLocationStrategy.

This is used under the hood of the Location service.

Applications should use the Router or Location services to interact with application route state.

For instance, HashLocationStrategy produces URLs like http://example.com#/foo, and PathLocationStrategy produces http://example.com/foo as an equivalent URL.

See these two classes for more.

Members

path() : string

Not Yet Documented

prepareExternalUrl(internal: string) : string

Not Yet Documented

pushState(state: any, title: string, url: string, queryParams: string) : void

Not Yet Documented

replaceState(state: any, title: string, url: string, queryParams: string) : void

Not Yet Documented

forward() : void

Not Yet Documented

back() : void

Not Yet Documented

onPopState(fn: (_: any) => any) : void

Not Yet Documented

getBaseHref() : string

Not Yet Documented