title: Ember.js helper with moment.js (using ember-cli) : Handlebars error: Could not find property
body: <p>I'm trying to use moment.js in my ember.js app (built with ember-cli), I have a trouble with this error</p>
  
  <p><code>Handlebars error: Could not find property 'formatDate' on object</code></p>
  
  <p>I think it's same as this error <a href="http://discuss.emberjs.com/t/how-to-use-custom-helpers-in-ember-app-kit/3336">How to use Custom helpers in ember-app-kit?</a> but I already did the same approach but not working yet. Anyone got same error? Please help me to figure out.</p>
  
  <p>I put 
  <code>app.import('vendor/momentjs/moment.js');</code> in <code>Brocfile.js</code> 
  and 
  <code>"moment": true</code> in <code>.jshintrc</code> as in ember-cli documentation,
  and I used the helper <code>{{formatDate date}}</code> in <code>PostsTemplate</code></p>
  
  <p>I created a helper <code>app/helpers/formatDate.js</code></p>
  
  <pre><code>var formatDate = Ember.Handlebars.makeBoundHelper(function(date) {
    return moment(date).fromNow();
  });
  
  export default formatDate;
  </code></pre>
  
  <p>I also tried this syntax in <code>app/helpers/formatDate.js</code>, but neither works and both get same error</p>
  
  <pre><code>export default Ember.Handlebars.registerBoundHelper('formatDate',function(date) {
    return moment(date).fromNow();
  });
  </code></pre>