Class View

Hierarchy

Index

Constructor methods

Properties

Methods

Constructor methods

constructor(options?: ViewOptions): View

Parameters

Returns

View

constructor(options?: ViewOptions): View

Parameters

Returns

View

Properties

public $el: JQuery

public app: App

public appEvents: StringMap

public attributes: any

public children: View[]

public cid: string

public className: string

public collection: Collection

public dataEvents: StringMap

public defaultOptions: DefaultOptions

public documentTitle: string

public el: any

public id: string

public model: TModel in Backbone.View<TModel extends Model>

public parent: View

public tagName: string

public template: any

public ui: StringMap

Methods

public $(selector: string): JQuery

Parameters

  • selector: string

Returns

JQuery

public $(selector: any): JQuery

Parameters

  • selector: any

Returns

JQuery

public $(selector: string): JQuery

Parameters

  • selector: string

Returns

JQuery

public $(selector: any): JQuery

Parameters

  • selector: any

Returns

JQuery

public _ensureElement()

public _ensureElement()

public addChild(child: View): View

Parameters

Returns

View

public addChildren(children: View[]): View

Parameters

Returns

View

public afterDispose(): View

Returns

View

public afterRender(): any

Returns

any

public attach(view: View, options?: AttachmentOptions): View

Parameters

Returns

View

public attachTo(el: any, options?: AttachmentOptions): View

Parameters

Returns

View

public beforeDispose(): View

Returns

View

public beforeRender(): any

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

public delegateEvents(events?: any): any

Parameters

  • events?: any optional

Returns

any

public delegateEvents(events?: any): any

Parameters

  • events?: any optional

Returns

any

public detach(preserve?: boolean): View

Parameters

  • preserve?: boolean optional

Returns

View

public static detachByElement(el: any, preserve?: boolean): View

Parameters

  • el: any
  • preserve?: boolean optional

Returns

View

public detachChildren(preserve?: boolean): View

Parameters

  • preserve?: boolean optional

Returns

View

public dispose(): View

Returns

View

public events(): any

Events hash or a method returning the events hash that maps events/selectors to methods on your View. For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; That works only if you set it in the constructor or the initialize method.

Returns

any

public events(): any

Events hash or a method returning the events hash that maps events/selectors to methods on your View. For assigning events as object hash, do it like this: this.events = { "event:selector": callback, ... }; That works only if you set it in the constructor or the initialize method.

Returns

any

public static getByCid(cid: string): View

Parameters

  • cid: string

Returns

View

public static getClosestView(el: any): View

Parameters

  • el: any

Returns

View

public invoke(method: string, args?: Array<any>): any

Parameters

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

Returns

any

public isAttached(el: any): boolean

Parameters

  • el: any

Returns

boolean

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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 listenToOnce(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 listenToOnce(object: any, events: string, callback: Function): any

Parameters

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

Returns

any

public make(tagName: string, attrs?: any, opts?: any): View

Parameters

  • tagName: string
  • attrs?: any optional
  • opts?: any optional

Returns

View

public make(tagName: any, attributes?: any, content?: any): any

Parameters

  • tagName: any
  • attributes?: any optional
  • content?: any optional

Returns

any

public make(tagName: string, attrs?: any, opts?: any): View

Parameters

  • tagName: string
  • attrs?: any optional
  • opts?: any optional

Returns

View

public make(tagName: any, attributes?: any, content?: any): any

Parameters

  • tagName: any
  • attributes?: any optional
  • content?: any optional

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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 on(eventName: string, callback?: Function, context?: any): any

Parameters

  • eventName: string
  • 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 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 once(events: string, callback: Function, context?: any): any

Parameters

  • events: string
  • callback: Function
  • 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 once(events: string, callback: Function, context?: any): any

Parameters

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

Returns

any

public remove(): View

Returns

View

public remove(): View

Returns

View

public removeChild(child: View, preserve?: boolean): View

Parameters

  • child: View
  • preserve?: boolean optional

Returns

View

public removeChildren(preserve?: boolean): View

Parameters

  • preserve?: boolean optional

Returns

View

public static removeDocumentEvents(prefix?: string): any

Parameters

  • prefix?: string optional

Returns

any

public render(options?: any): View

Parameters

  • options?: any optional

Returns

View

public serialize(): any

Returns

any

public static setDocumentEventPrefix(prefix?: string): any

Parameters

  • prefix?: string optional

Returns

any

public static setDocumentEvents(events: Array<string>, prefix?: string): Array<string>

Parameters

  • events: Array<string>
  • prefix?: string optional

Returns

Array<string>

public setElement(element: HTMLElement, delegate?: boolean): View

Parameters

  • element: HTMLElement
  • delegate?: boolean optional

Returns

View

public setElement(element: JQuery, delegate?: boolean): View

Parameters

  • element: JQuery
  • delegate?: boolean optional

Returns

View

public setElement(element: any): View

Parameters

  • element: any

Returns

View

public setElement(element: HTMLElement, delegate?: boolean): View

Parameters

  • element: HTMLElement
  • delegate?: boolean optional

Returns

View

public setElement(element: JQuery, delegate?: boolean): View

Parameters

  • element: JQuery
  • delegate?: boolean optional

Returns

View

public setElement(element: any): View

Parameters

  • element: any

Returns

View

public setParent(parent: View): View

Parameters

Returns

View

public static setTemplateStrategy(strategy: any, instance?: any): any

Parameters

  • strategy: any
  • instance?: any optional

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

public templateStrategy(): string

Returns

string

public static to$El(el: any, parent?: any, allowParentMatch?: boolean): JQuery

Parameters

  • el: any
  • parent?: any optional
  • allowParentMatch?: boolean optional

Returns

JQuery

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

Parameters

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

Returns

any

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

Parameters

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

Returns

any

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

Parameters

  • eventName: string
  • args?: Array<any> 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

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

Parameters

  • eventName?: string optional
  • callback?: Function optional
  • context?: 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

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

Parameters

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

Returns

any

public undelegateEvents(): any

Returns

any

public undelegateEvents(): any

Returns

any