mardi 30 août 2016

Ember run later in coffeescript not working correctly

I am pretty new to Ember so I am totally stumped by this. The run later appears to work however it seems to ignore the fact that it is supposed to only run once every 5 seconds to update the status. Also because of this code the page never actually gets rendered. I must be doing something wrong in this code:

App.ServersController = Ember.ArrayController.extend(

    startWatchingStatus: () ->
        controller = @
        controller.getServers()
        Ember.run.later(controller, () ->
        controller.startWatchingStatus()
        , 5000)




Aucun commentaire:

Enregistrer un commentaire