title: Pass function to an Ember component
body: <p>Is it possible to pass a function to a component? I'm trying to move my code away from views and towards components to keep my Ember app moving forward (see <a href="http://www.samselikoff.com/blog/preparing-for-ember-2.0/" rel="nofollow">here</a>), and I've got a bunch of commonly used functions I use throughout my site. I am not sure how to call them from within a component. I had put them in their own controller in my older code, but I hear it's sloppy or unwise to pass controllers to a component.</p>
  
  <p>For example in a component handlebars file, I'm considering this:</p>
  
  <pre><code>{{a-cool-component 
    property1=someValue
    function1=controllers.utils.doSomethingRepetitious 
  }}
  </code></pre>
  
  <p>So that in my component javascript code I can do something like this...</p>
  
  <pre><code>FacetListItemComponent = Ember['default'].Component.extend({
    property1: null
    property2: null
    function1: null 
    didInsertElement: function() {
      //... do stuff here
      this.set('property2', this.function1(this.get('property1')));
    }
  );
  exports['default'] = FacetListItemComponent;
  </code></pre>
  
  <p>I tried it in a component I'm building, but the <code>function1</code> came across as <em>undefined</em>. </p>
  
  <p>Any suggestions?</p>
  
  <p>I'm using Ember 1.11 on Ember-CLI 0.2.7</p>
  
  <p>Bryan</p>