CanJS how to refresh a model
问题 I have a model which represents a list of jobs which are run on the server I want to poll the server for updates on a timer to show changes to the state of the jobs. How do I do this? My Control looks like this var control = Control({ defaults: { view: 'app/views/job-index.ejs' } }, { init: function () { this.element .empty() .append(can.view(this.options.view, this.options)); var options = this.options; window.setInterval(function() { options.result.refresh(); }, 1000); }, }); my model, so