home
  • Blog
  • Home
  • Projects
    • Ember
    • EmberData
    • Ember CLI
1.13
  • Packages
    • ember-data
  • Namespaces
    • DS
    • Ember.Date
  • Classes
    • DS.AbortError
    • DS.ActiveModelAdapter
    • DS.ActiveModelSerializer
    • DS.Adapter
    • DS.AdapterError
    • DS.AdapterPopulatedRecordArray
    • DS.BooleanTransform
    • DS.BuildURLMixin
    • DS.DateTransform
    • DS.EmbeddedRecordsMixin
    • DS.Errors
    • DS.FilteredRecordArray
    • DS.FixtureAdapter
    • DS.InternalModel
    • DS.InvalidError
    • DS.JSONAPIAdapter
    • DS.JSONAPISerializer
    • DS.JSONSerializer
    • DS.ManyArray
    • DS.Model
    • DS.NumberTransform
    • DS.PromiseArray
    • DS.PromiseManyArray
    • DS.PromiseObject
    • DS.RESTAdapter
    • DS.RESTSerializer
    • DS.RecordArray
    • DS.RootState
    • DS.Serializer
    • DS.Store
    • DS.StringTransform
    • DS.TimeoutError
    • DS.Transform

Class DS.PromiseArray


Extends: Ember.ArrayProxy
Uses: Ember.PromiseProxyMixin
Defined in: packages/ember-data/lib/system/promise-proxies.js:4
Module: ember-data

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.

For more information see the Ember.PromiseProxyMixin documentation.

Example

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

promiseArray.get('length'); // 0

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


On this page

Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2025 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue Created with Sketch.