title: How do I call a controller function from a template in Ember?
body: <p>Let's say I have a template which iterates over a collection of items, and I want to call a function with each item which is specific to the controller, and not a model-level concern:</p>
  
  <pre><code>{{#each people as |person|}}
    icon name: {{findIconFor(person)}}
  {{/each}}
  </code></pre>
  
  <p>I'd like to define <code>findIconFor</code> in the controller, because this is something specific to this particular view.</p>
  
  <pre><code>export default Ember.Controller.extend({
    findIconFor: function(person) {
      // figure out which icon to use
    }
  );
  </code></pre>
  
  <p><strong>But that doesn't work.</strong>  The template fails to compile.  Parse error: <em>Expecting 'STRING', 'NUMBER', 'ID', 'DATA', got 'INVALID'</em></p>
  
  <p>What is the "ember way" to do this?</p>