Class History

Hierarchy

Index

Properties

Methods

Properties

public handlers: Array<any>

public interval: number

public options: any

public started: boolean

Methods

private _updateHash(location: Location, fragment: string, replace: boolean)

Parameters

  • location: Location
  • fragment: string
  • replace: boolean

public bind(eventName: string, callback: Function, context?: any): any

Parameters

  • eventName: string
  • callback: Function
  • context?: any optional

Returns

any

public checkUrl(e?: any)

Parameters

  • e?: any optional

public getFragment(fragment?: string, forcePushState?: boolean): string

Parameters

  • fragment?: string optional
  • forcePushState?: boolean optional

Returns

string

public getHash(window?: Window): string

Parameters

  • window?: Window optional

Returns

string

public listenTo(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public listenToOnce(object: any, events: string, callback: Function): any

Parameters

  • object: any
  • events: string
  • callback: Function

Returns

any

public loadUrl(fragmentOverride: string): boolean

Parameters

  • fragmentOverride: string

Returns

boolean

public navigate(fragment: string, options?: any): boolean

Parameters

  • fragment: string
  • options?: any optional

Returns

boolean

public off(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any

public on(eventName: string, callback?: Function, context?: any): any

Parameters

  • eventName: string
  • callback?: Function optional
  • context?: any optional

Returns

any

public once(events: string, callback: Function, context?: any): any

Parameters

  • events: string
  • callback: Function
  • context?: any optional

Returns

any

public route(route: string, callback: Function): number

Parameters

  • route: string
  • callback: Function

Returns

number

public start(options?: HistoryOptions): boolean

Parameters

Returns

boolean

public stop()

public stopListening(object?: any, events?: string, callback?: Function): any

Parameters

  • object?: any optional
  • events?: string optional
  • callback?: Function optional

Returns

any

public trigger(eventName: string, args?: Array<any>): any

Parameters

  • eventName: string
  • args?: Array<any> optional

Returns

any

public unbind(eventName?: string, callback?: Function, context?: any): any

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: any optional

Returns

any