MockLocationStrategy

MockLocationStrategy

Stable Class

Class Overview

class MockLocationStrategy extends LocationStrategy {
  constructor()
  
  
  internalBaseHref : string
  internalPath : string
  internalTitle : string
  urlChanges : string[]
  simulatePopState(url: string) : void
  path(includeHash?: boolean) : string
  prepareExternalUrl(internal: string) : string
  pushState(ctx: any, title: string, path: string, query: string) : void
  replaceState(ctx: any, title: string, path: string, query: string) : void
  onPopState(fn: (value: any) => void) : void
  getBaseHref() : string
  back() : void
  forward() : void
}

Class Description

A mock implementation of LocationStrategy that allows tests to fire simulated location events.

Annotations

@Injectable()

Constructor

constructor()

Class Details

internalBaseHref : string
internalPath : string
internalTitle : string
urlChanges : string[]
simulatePopState(url: string) : void
path(includeHash?: boolean) : string
prepareExternalUrl(internal: string) : string
pushState(ctx: any, title: string, path: string, query: string) : void
replaceState(ctx: any, title: string, path: string, query: string) : void
onPopState(fn: (value: any) => void) : void
getBaseHref() : string
back() : void
forward() : void

exported from common-testing-index, defined in common/testing/src/mock_location_strategy.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/common/testing/index/MockLocationStrategy-class.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部