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;
isFulfilled public
Defined in ../packages/model/src/-private/promise-many-array.ts:104
Whether the loading promise succeeded
isPending public
Defined in ../packages/model/src/-private/promise-many-array.ts:90
Whether the loading promise is still pending
isRejected public
Defined in ../packages/model/src/-private/promise-many-array.ts:97
Whether the loading promise rejected
isSettled public
Defined in ../packages/model/src/-private/promise-many-array.ts:111
Whether the loading promise completed (resolved or rejected)
length public
Defined in ../packages/model/src/-private/promise-many-array.ts:44
Retrieve the length of the content
links public
Defined in ../packages/model/src/-private/promise-many-array.ts:165
Retrieve the links for this relationship
meta public
Defined in ../packages/model/src/-private/promise-many-array.ts:175
Retrieve the meta for this relationship