Store.sync () callback

Is there a callback for store.sync ()?

I am trying to do:

store.sync(function(){ alert('1'); }); 

but that will not work. A store is a local store.

0
source share
3 answers

There is no β€œcallback” for synchronization (). To achieve this behavior, you will need to listen to the write event in the repository. Check out this solution .

+1
source

You can try:

 store.sync({ callback: function (records, operation) { alert('1'); } }); 
0
source

There is a way to listen to the success event

 store.on('write', function(){ alert('ready'); }); store.sync(); 

write triggered whenever a successful write is performed using a configured proxy

0
source

All Articles