title: Sending action from component to route in ember.js
body: <p>Here's the route:</p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Route.extend({
      actions: {
          closeModal: function () {
              alert('asdf');
          }
      }
  });
  </code></pre>
  
  <p>And the component js code:</p>
  
  <pre><code>import Ember from 'ember';
  
  export default Ember.Component.extend({
      actions: {
          closeModal: function () {
              this.sendAction('closeModal');
          }
      }
  });
  </code></pre>
  
  <p>What I'd like to do is to (as the code may suggest ;) ) send an action from component to route, so that the route could act upon it. However the code above doesn't work - component properly handles the action, but the <code>sendAction</code> call inside it's method doesn't do anything.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I solved this problem using:</p>
  
  <p><code>this._controller.send('closeModal');</code> inside component's action method however this solution doesn't satisfy me. Ember authors are saying that controllers will be removed in ember 2.0, so in my code I don't want to have any references to them. Suggestions?</p>