Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have just done something similar. You should use <code>activate</code> property on your route (<a href="http://emberjs.com/api/classes/Ember.Route.html#method_activate" rel="nofollow">http://emberjs.com/api/classes/Ember.Route.html#method_activate</a>). </p> <p>Checkout this pull request: <a href="https://github.com/chrmod/rowmark/pull/2/files" rel="nofollow">https://github.com/chrmod/rowmark/pull/2/files</a></p> <h3>Some example:</h3> <pre><code>App.NoteRoute = Ember.Route.extend({ activate: function() { this.interval = setInterval(function() { this.get('controller').set('toSave', true); }.bind(this), 5000); } }) </code></pre> <h3>UPDATE</h3> <p>I understand you wrong. Sorry for that.</p> <p>First of all you need to know that <code>find</code> from <code>Ember Model</code> or <code>Ember Data</code> returns <code>promises</code> (<a href="http://emberjs.com/blog/2013/05/28/ember-data-0-13.html" rel="nofollow">http://emberjs.com/blog/2013/05/28/ember-data-0-13.html</a>)</p> <p>I think you can do such trick to implement that:</p> <pre><code>App = Ember.Application.create({ ready: function() { var switchboard; setInterval(function() { switchboard = App.Switchboard.find(switchboard_id).then(function(){ setTimeout(function(){}, 499); }); }, 1); } }); </code></pre> <p>First of all we run <code>setInterval</code> to run this in infinity <code>loop</code>. Next in each loop iteration we find <code>Switchboard</code> and when <code>Ember data</code> loads from external server those data that run <code>function</code> that is passed to <code>then</code>. This function simply wait 499ms :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload