Platform agnostic services. Can be used both in the browser and on the server.
Constants
- APP_BASE_HREF → OpaqueToken
-
The
APP_BASE_HREF
token represents the base href to be used with thePathLocationStrategy
.const OpaqueToken("appBaseHref")
Classes
- HashLocationStrategy
-
HashLocationStrategy
is a LocationStrategy used to configure the PlatformLocation service to represent its state in the hash fragment of the browser's URL. - Location
-
Location
is a service that applications can use to interact with a browser's URL. Depending on which LocationStrategy is used,Location
will either persist to the URL's path or the URL's hash segment. - LocationStrategy
-
LocationStrategy
is responsible for representing and reading route state from the browser's URL. Angular provides two strategies:HashLocationStrategy
and PathLocationStrategy. - PathLocationStrategy
-
PathLocationStrategy
is a LocationStrategy used to configure the Location service to represent its state in the path of the browser's URL. - PlatformLocation
-
This class should not be used directly by an application developer. Instead, use
Location
.