Class Ember.TrackedArray

An Ember.TrackedArray tracks array operations. It's useful when you want to lazily compute the indexes of items in an array after they've been shifted by subsequent operations.

Show:

Module: ember
index
newItems

Track that newItems were added to the tracked array at index.

Module: ember
callback
Function

Apply all operations, reducing them to retain:n, for n, the number of items in the array.

callback will be called for each operation and will be passed the following arguments:

  • {array} items The items for the given operation
  • {number} offset The computed offset of the items, ie the index in the array of the first item for this operation.
  • {string} operation The type of the operation. One of Ember.TrackedArray.{RETAIN, DELETE, INSERT}
Module: ember
index
count

Track that count items were removed at index.