LocationStrategy is responsible for representing and reading route state from the browser's URL. Angular provides two strategies: HashLocationStrategy 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.

Implemented by

Constructors

LocationStrategy()

Properties

hashCode → int

Get a hash code for this object.

read-only, inherited
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.

inherited

Methods

back() → void

forward() → void

getBaseHref() → String

hash() → String

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
onPopState(EventListener fn) → void

path() → String

prepareExternalUrl(String internal) → String

pushState(state, String title, String url, String queryParams) → void

replaceState(state, String title, String url, String queryParams) → void

toString() → String

Returns a string representation of this object.

inherited