{ "id": "api/common/upgrade/$locationShimProvider", "title": "$locationShimProvider", "contents": "\n\n
\n
\n
\n \n API > @angular/common > @angular/common/upgrade\n
\n \n
\n \n
\n

$locationShimProviderlink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

The factory function used to create an instance of the $locationShim in Angular,\nand provides an API-compatiable $locationProvider for AngularJS.

\n\n \n
\n \n \n \n
\n\nclass $locationShimProvider {\n constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy)\n $get()\n hashPrefix(prefix?: string)\n html5Mode(mode?: any)\n}\n\n\n \n \n\n
\n\n\n \n\n \n \n \n\n\n\n\n\n\n

Constructorlink

\n\n\n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n \n\n constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy)\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n ngUpgrade\n UpgradeModule\n \n \n
\n \n location\n Location\n \n \n
\n \n platformLocation\n PlatformLocation\n \n \n
\n \n urlCodec\n UrlCodec\n \n \n
\n \n locationStrategy\n LocationStrategy\n \n \n
\n\n \n\n\n \n\n \n
\n
\n\n\n\n\n\n\n\n\n
\n

Methodslink

\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n $get()\n \n link

\n \n
\n
\n

Factory method that returns an instance of the $locationShim

\n\n
\n
\n \n\n $get()\n\n \n\n
Parameters
\n

There are no parameters.

\n\n \n\n\n \n\n \n
\n
\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n hashPrefix()\n \n link

\n \n
\n
\n

Stub method used to keep API compatible with AngularJS. This setting is configured through\nthe LocationUpgradeModule's config method in your Angular app.

\n\n
\n
\n \n\n hashPrefix(prefix?: string)\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n
\n \n prefix\n string\n

Optional. Default is undefined.

\n \n
\n\n \n\n\n \n\n \n
\n
\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n html5Mode()\n \n link

\n \n
\n
\n

Stub method used to keep API compatible with AngularJS. This setting is configured through\nthe LocationUpgradeModule's config method in your Angular app.

\n\n
\n
\n \n\n html5Mode(mode?: any)\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n
\n \n mode\n any\n

Optional. Default is undefined.

\n \n
\n\n \n\n\n \n\n \n
\n
\n\n \n
\n\n\n\n \n\n\n
\n
\n\n\n" }