Class PromiseManyArray
publicThis class is returned as the result of accessing an async hasMany relationship
on an instance of a Model extending from @ember-data/model
.
A PromiseManyArray is an iterable proxy that allows templates to consume related ManyArrays and update once their contents are no longer pending.
In your JS code you should resolve the promise first.
const comments = await post.comments;
catch (callback) public
Defined in ../packages/model/src/-private/promise-many-array.ts:185
- callback
- returns
Promise
catch errors thrown by this promise
finally (callback) public
Defined in ../packages/model/src/-private/promise-many-array.ts:196
- callback
- returns
Promise
run cleanup after this promise completes
reload (options) public
Defined in ../packages/model/src/-private/promise-many-array.ts:128
- options
- returns
Reload the relationship
then (success, fail) public
Defined in ../packages/model/src/-private/promise-many-array.ts:172
- success
- fail
- returns
Promise
chain this promise