填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

$locationShimProvider

Angular 中用于创建 $locationShim 实例的工厂函数,并为 AngularJS 提供与 API 兼容的 $locationProvider

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

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

构造函数

      
      constructor(ngUpgrade: UpgradeModule, location: Location, platformLocation: PlatformLocation, urlCodec: UrlCodec, locationStrategy: LocationStrategy)
    
参数
ngUpgrade UpgradeModule
location Location
platformLocation PlatformLocation
urlCodec UrlCodec
locationStrategy LocationStrategy

方法

返回 $locationShim 实例的工厂方法

Factory method that returns an instance of the $locationShim

      
      $get()
    
参数

没有参数。

用于使 API 与 AngularJS 兼容的存根方法。此设置是通过 Angular 应用中 LocationUpgradeModule 的 config 方法配置的。

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

      
      hashPrefix(prefix?: string)
    
参数
prefix string
可选. 默认值是 `undefined`.

用于使 API 与 AngularJS 兼容的存根方法。此设置是通过 Angular 应用中 LocationUpgradeModule 的 config 方法配置的。

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

      
      html5Mode(mode?: any)
    
参数
mode any
可选. 默认值是 `undefined`.