Class AppRouter

Hierarchy

Index

Constructor methods

Methods

Constructor methods

constructor(options?: AppRouterOptions): AppRouter

Parameters

Returns

AppRouter

Methods

public appRoute(route: string, methodName: string)

Parameters

  • route: string
  • methodName: string

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

Parameters

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

Returns

any

public initialize(options?: RouterOptions)

Parameters

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 navigate(fragment: string, options?: NavigateOptions): Router

Parameters

Returns

Router

public navigate(fragment: string, trigger?: boolean): Router

Parameters

  • fragment: string
  • trigger?: boolean optional

Returns

Router

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 processAppRoutes(controller: any, appRoutes: any): any

Parameters

  • controller: any
  • appRoutes: any

Returns

any

public route(route: string, name: string, callback?: Function): Router

Parameters

  • route: string
  • name: string
  • callback?: Function optional

Returns

Router

public routes(): any

Routes hash or a method returning the routes hash that maps URLs with parameters to methods on your Router. For assigning routes as object hash, do it like this: this.routes = { "route": callback, ... }; That works only if you set it in the constructor or the initialize method.

Returns

any

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