AnsweredAssumed Answered

How get relatedCollections from a model on offiline mode?

Question asked by Felippe Junger on Jan 4, 2018
Latest reply on Feb 27, 2018 by Andrew Zhukovsky

Hi,

 

I'd like to get all related collections from a model when the device is offline, no internet connection.

 

I'm using:

return new Promise( (resolve, reject) => {

model.getRelatedCollection("link")

.fetch({
      relate : true,
      success : data => resolve(data.models),
      error : (error, http) => reject(http),
      filter : filter,
      limit : limit
});

 

});

 

but, on offline mode, I allways receveid the message error: Device is offline, No Internet connection (Error callback called). On online mode all models were returned.

 

So, how get relatedCollections from a model on offiline mode?

Outcomes