Class ArrayController

Provides a way for you to publish a collection of objects so that you can easily bind to the collection from a Handlebars #each helper, an Ember.CollectionView, or other controllers.

Hierarchy

Index

Properties

Methods

Properties

public @each: EachProxy

public Boolean: boolean

public []: Array<any>

public addObserver: ModifyObserver

public arrangedContent: any

public concatenatedProperties: Array<any>

Defines the properties that will be concatenated from the superclass (instead of overridden).

public controllers: {}

public firstObject: any

public hasEnumerableObservers: boolean

public static isClass: boolean

public isDestroyed: boolean

Destroyed object property flag. If this property is true the observers and bindings were already removed by the effect of calling the destroy() method.

public isDestroying: boolean

Destruction scheduled flag. The destroy() method has been called. The object stays intact until the end of the run loop at which point the isDestroyed flag is set.

public static isMethod: boolean

public itemController: string

public lastObject: any

public length: number

public map: ItemIndexEnumerableCallbackTarget

public needs: Array<string>

public reject: ItemIndexEnumerableCallbackTarget

public sortAscending: boolean

public sortFunction: Comparable

public sortProperties: Array<any>

public target: any

Methods

public addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public addObject(object: any): any

Parameters

  • object: any

Returns

any

public addObjects(objects: Enumerable): Array<any>

Parameters

Returns

Array<any>

public any(callback: Function, target?: any): boolean

Parameters

  • callback: Function
  • target?: any optional

Returns

boolean

public anyBy(key: string, value?: string): boolean

Parameters

  • key: string
  • value?: string optional

Returns

boolean

public arrayContentDidChange(startIdx: number, removeAmt: number, addAmt: number): Array<any>

Parameters

  • startIdx: number
  • removeAmt: number
  • addAmt: number

Returns

Array<any>

public arrayContentWillChange(startIdx: number, removeAmt: number, addAmt: number): Array<any>

Parameters

  • startIdx: number
  • removeAmt: number
  • addAmt: number

Returns

Array<any>

public beginPropertyChanges(): Observable

Returns

Observable

public cacheFor(keyName: string): any

Parameters

  • keyName: string

Returns

any

public clear(): Array<any>

Returns

Array<any>

public compact(): Array<any>

Returns

Array<any>

public contains(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public decrementProperty(keyName: string, decrement?: number): number

Parameters

  • keyName: string
  • decrement?: number optional

Returns

number

public destroy(): CoreObject

Destroys an object by setting the isDestroyed flag and removing its metadata, which effectively destroys observers and bindings. If you try to set a property on a destroyed object, an exception will be raised. Note that destruction is scheduled for the end of the run loop and does not happen immediately. It will set an isDestroying flag immediately.

Returns

CoreObject

public static detect(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public static detectInstance(obj: any): boolean

Parameters

  • obj: any

Returns

boolean

public static eachComputedProperty(callback: Function, binding: {})

Iterate over each computed property for the class, passing its name and any associated metadata (see metaForProperty) to the callback.

Parameters

  • callback: Function
  • binding: {}

public endPropertyChanges(): Observable

Returns

Observable

public enumerableContentDidChange(start: number, removing: number, adding: number): any

Parameters

  • start: number
  • removing: number
  • adding: number

Returns

any

public enumerableContentDidChange(start: number, removing: Enumerable, adding: number): any

Parameters

  • start: number
  • removing: Enumerable
  • adding: number

Returns

any

public enumerableContentDidChange(start: number, removing: number, adding: Enumerable): any

Parameters

  • start: number
  • removing: number
  • adding: Enumerable

Returns

any

public enumerableContentDidChange(start: number, removing: Enumerable, adding: Enumerable): any

Parameters

Returns

any

public enumerableContentDidChange(removing: number, adding: number): any

Parameters

  • removing: number
  • adding: number

Returns

any

public enumerableContentDidChange(removing: Enumerable, adding: number): any

Parameters

Returns

any

public enumerableContentDidChange(removing: number, adding: Enumerable): any

Parameters

Returns

any

public enumerableContentDidChange(removing: Enumerable, adding: Enumerable): any

Parameters

Returns

any

public enumerableContentWillChange(removing: number, adding: number): Array<any>

Parameters

  • removing: number
  • adding: number

Returns

Array<any>

public enumerableContentWillChange(removing: Enumerable, adding: number): Array<any>

Parameters

Returns

Array<any>

public enumerableContentWillChange(removing: number, adding: Enumerable): Array<any>

Parameters

Returns

Array<any>

public enumerableContentWillChange(removing: Enumerable, adding: Enumerable): Array<any>

Parameters

Returns

Array<any>

public every(callback: Function, target?: any): boolean

Parameters

  • callback: Function
  • target?: any optional

Returns

boolean

public everyBy(key: string, value?: string): boolean

Parameters

  • key: string
  • value?: string optional

Returns

boolean

public everyProperty(key: string, value?: string): boolean

Parameters

  • key: string
  • value?: string optional

Returns

boolean

public filter(callback: Function, target: any): Array<any>

Parameters

  • callback: Function
  • target: any

Returns

Array<any>

public filterBy(key: string, value?: string): Array<any>

Parameters

  • key: string
  • value?: string optional

Returns

Array<any>

public find(callback: Function, target: any): any

Parameters

  • callback: Function
  • target: any

Returns

any

public findBy(key: string, value?: string): any

Parameters

  • key: string
  • value?: string optional

Returns

any

public forEach(callback: Function, target?: any): any

Parameters

  • callback: Function
  • target?: any optional

Returns

any

public get(keyName: string): any

Parameters

  • keyName: string

Returns

any

public getEach(key: string): Array<any>

Parameters

  • key: string

Returns

Array<any>

public getProperties(string?: Array<any>): {}

Parameters

  • string?: Array<any> optional

Returns

{}

public getProperties(keys: Array<string>): {}

Parameters

  • keys: Array<string>

Returns

{}

public getWithDefault(keyName: string, defaultValue: any): any

Parameters

  • keyName: string
  • defaultValue: any

Returns

any

public hasObserverFor(key: string): boolean

Parameters

  • key: string

Returns

boolean

public incrementProperty(keyName: string, increment?: number): number

Parameters

  • keyName: string
  • increment?: number optional

Returns

number

public indexOf(object: any, startAt: number): number

Parameters

  • object: any
  • startAt: number

Returns

number

public init()

public insertAt(idx: number, object: any): Array<any>

Parameters

  • idx: number
  • object: any

Returns

Array<any>

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

Parameters

  • methodName: string
  • any?: Array<any> optional

Returns

Array<any>

public lastIndexOf(object: any, startAt: number): number

Parameters

  • object: any
  • startAt: number

Returns

number

public lookupItemController(object: any): string

Parameters

  • object: any

Returns

string

public mapBy(key: string): Array<any>

Parameters

  • key: string

Returns

Array<any>

public static metaForProperty(key: string): {}

Returns the original hash that was passed to meta().

Parameters

  • key: string

    property name

Returns

{}

public nextObject(index: number, previousObject: any, context: any): any

Parameters

  • index: number
  • previousObject: any
  • context: any

Returns

any

public notifyPropertyChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public objectAt(idx: number): any

Parameters

  • idx: number

Returns

any

public objectAtContent(idx: number): any

Parameters

  • idx: number

Returns

any

public objectsAt(number?: Array<any>): Array<any>

Parameters

  • number?: Array<any> optional

Returns

Array<any>

public popObject(): any

Returns

any

public propertyDidChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public propertyWillChange(keyName: string): Observable

Parameters

  • keyName: string

Returns

Observable

public pushObject(obj: any): any

Parameters

  • obj: any

Returns

any

public pushObjects(any?: Array<any>): Array<any>

Parameters

  • any?: Array<any> optional

Returns

Array<any>

public reduce(callback: ReduceCallback, initialValue: any, reducerProperty: string): any

Parameters

Returns

any

public rejectBy(key: string, value?: string): Array<any>

Parameters

  • key: string
  • value?: string optional

Returns

Array<any>

public removeArrayObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public removeAt(start: number, len: number): any

Parameters

  • start: number
  • len: number

Returns

any

public removeEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): Array<any>

Parameters

Returns

Array<any>

public removeObject(object: any): any

Parameters

  • object: any

Returns

any

public removeObjects(objects: Enumerable): Array<any>

Parameters

Returns

Array<any>

public removeObserver(key: string, target: any, method: string): Observable

Parameters

  • key: string
  • target: any
  • method: string

Returns

Observable

public removeObserver(key: string, target: any, method: Function): Observable

Parameters

  • key: string
  • target: any
  • method: Function

Returns

Observable

public replace(idx: number, amt: number, objects: Array<any>): any

Parameters

  • idx: number
  • amt: number
  • objects: Array<any>

Returns

any

public replaceContent(idx: number, amt: number, objects: Array<any>)

Parameters

  • idx: number
  • amt: number
  • objects: Array<any>

public replaceRoute(name: string, any?: Array<any>): any

Parameters

  • name: string
  • any?: Array<any> optional

Returns

any

public reverseObjects(): Array<any>

Returns

Array<any>

public set(keyName: string, value: any): Observable

Parameters

  • keyName: string
  • value: any

Returns

Observable

public setEach(key: string, value?: any): any

Parameters

  • key: string
  • value?: any optional

Returns

any

public setObjects(objects: Array<any>): Array<any>

Parameters

  • objects: Array<any>

Returns

Array<any>

public setProperties(hash: {}): Observable

Parameters

  • hash: {}

Returns

Observable

public shiftObject(): any

Returns

any

public slice(beginIndex?: number, endIndex?: number): Array<any>

Parameters

  • beginIndex?: number optional
  • endIndex?: number optional

Returns

Array<any>

public some(callback: Function, target?: any): boolean

Parameters

  • callback: Function
  • target?: any optional

Returns

boolean

public someProperty(key: string, value?: string): boolean

Parameters

  • key: string
  • value?: string optional

Returns

boolean

public toArray(): Array<any>

Returns

Array<any>

public toString(): string

Returns a string representation which attempts to provide more information than Javascript's toString typically does, in a generic way for all Ember objects (e.g., "").

Returns

string

public toggleProperty(keyName: string): any

Parameters

  • keyName: string

Returns

any

public transitionToRoute(name: string, any?: Array<any>): any

Parameters

  • name: string
  • any?: Array<any> optional

Returns

any

public uniq(): Array<any>

Returns

Array<any>

public unshiftObject(object: any): any

Parameters

  • object: any

Returns

any

public unshiftObjects(objects: Array<any>): Array<any>

Parameters

  • objects: Array<any>

Returns

Array<any>

public willDestroy()

public without(value: any): Array<any>

Parameters

  • value: any

Returns

Array<any>