DS.Store#peekAll()

peekAll (modelName) DS.RecordArray

Defined in addon/-private/system/store.js:1473
Available since 1.13.0

This method returns a filtered array that contains all of the known records for a given type in the store.

Note that because it's just a filter, the result will contain any locally created records of the type, however, it will not make a request to the backend to retrieve additional records. If you would like to request all the records from the backend please use store.findAll.

Also note that multiple calls to peekAll for a given type will always return the same RecordArray.

Example

var localPosts = store.peekAll('post');

Parameters:

modelName String

Returns:

DS.RecordArray
doc_EmberJs
2016-11-30 16:50:53
Comments
Leave a Comment

Please login to continue.