Class PromiseArray

public

A PromiseArray is an object that acts like both an Ember.Array and a promise. When the promise is resolved the resulting value will be set to the PromiseArray's content property. This makes it easy to create data bindings with the PromiseArray that will be updated when the promise resolves.

This class should not be imported and instantiated directly.

For more information see the Ember.PromiseProxyMixin documentation.

Example

let promiseArray = PromiseArray.create({
  promise: $.getJSON('/some/remote/data.json')
});

promiseArray.length; // 0

promiseArray.then(function() {
  promiseArray.length; // 100
});