title: Delay iron route - Meteor
body: <p>I'm using Iron Router and I want to add an animation on the loading template. So I did a transition which takes 1400ms.</p>
  
  <p>Some loading time are faster than the 1400ms and mess up with the animation logic.</p>
  
  <p>So, I want to make loading time take at least 1400ms and I created a Session variable telling when the loading animation is finished.</p>
  
  <p>I tried (in coffee):</p>
  
  <pre><code>Router.onBeforeAction -&gt;
    self = @
    run = null
  
    routerAvailable = -&gt;
      if Session.get "navAvailable"
        clearInterval(run)
        self.next()
  
    run = Meteor.setInterval( routerAvailable, 200)
  
    @stop()
  
    return
  </code></pre>
  
  <p>But, it's not working. I get this error message:</p>
  
  <pre><code>Route dispatch never rendered. Did you forget to call this.next() in an onBeforeAction?
  </code></pre>