title: How to execute a function every time the app enters a given route in ember-js
body: <p>Suppose I have got a given ember application</p>
  
  <p><code>App = Ember.Application.create()</code></p>
  
  <p>A router</p>
  
  <pre><code>App.Router.map(function() {
    this.resource("posts", function() {
      this.resource("post", {
        path: "/:post_id"
      })
    });
  });
  </code></pre>
  
  <p>How do I execute a function each time whenever the application enters a given /:post_id ?</p>