LocationStrategy class abstract
LocationStrategy
is responsible for representing and reading route state
from the browser's URL. Angular provides two strategies:
HashLocationStrategy and PathLocationStrategy (default).
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.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
back(
) → void -
forward(
) → void -
getBaseHref(
) → String -
hash(
) → String -
Creates a combined hash code for a number of objects.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onPopState(
EventListener fn) → void -
path(
) → String -
prepareExternalUrl(
String internal) → String -
pushState(
Object? state, String title, String url, String queryParams) → void -
replaceState(
Object? state, String title, String url, String queryParams) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited