dimanche 28 février 2016

Is there a setInterval equivalent in Ember.js?

Is there a method I should be using for this? I couldn't find anything in Ember.run.

I'm thinking of implementing something very simple like this:

runOnInterval(){
  this.set('interval', Ember.run.later(this, function() {
    //Do something
    this.runOnInterval();
  }, 5000));
}

Any better way to do this? Should I just use setInterval?




Aucun commentaire:

Enregistrer un commentaire