DS.Store#recordIsLoaded()

recordIsLoaded (modelName, id) Boolean

Defined in addon/-private/system/store.js:1637

This method returns if a certain record is already loaded in the store. Use this function to know beforehand if a findRecord() will result in a request or that it will be a cache hit.

Example

store.recordIsLoaded('post', 1); // false
store.findRecord('post', 1).then(function() {
  store.recordIsLoaded('post', 1); // true
});

Parameters:

modelName String
id String

Returns:

Boolean
doc_EmberJs
2016-11-30 16:50:55
Comments
Leave a Comment

Please login to continue.