mgonto/restangular

How to make sync call?

thealberto opened this issue · 0 comments

Hi,
I have a JS function more or less like the following:

AnnouncesRestangular.all('Votes').getList().then(function(votes) {
        votes.forEach(function(pp) {
          ...
        });
      });

In the browser's console I can see the messages from the function after the above one before the above function is done. How can I avoid it?

Thanks for your help