W3cubDocs

/Angular

$locationShimProvider

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

API

class $locationShimProvider {
  constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy): $locationShimProvider;
  $get(): $locationShim;
  hashPrefix(prefix?: string | undefined): void;
  html5Mode(mode?: any): void;
}

constructor

$locationShimProvider
@paramngUpgradeUpgradeModule
@paramlocationLocation
@paramplatformLocationPlatformLocation
@paramurlCodecUrlCodec
@paramlocationStrategyLocationStrategy

$get

$locationShim

Factory method that returns an instance of the $locationShim

@returns$locationShim

hashPrefix

void

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

@paramprefixstring | undefined
@returnsvoid

html5Mode

void

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

@parammodeany
@returnsvoid

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/common/upgrade/$locationShimProvider