3

How should I create helpers for Ember 1.10 version?

Ember.Handlebars.helper('my-link-to', function() {
  # Some cool logic here
  return Ember.Handlebars.helpers['link-to'].apply(this, arguments);
});
...
<script type="text/x-handlebars" data-template-name="index">
  {{#my-link-to index}}
    Hello
  {{/my-link-to}}
</script>

Im trying to create a custom link-to helper by extending the existant one, but I dont get it. Here is the bin:

http://emberjs.jsbin.com/lisofejawo/1/edit?html,js,output

Ungue
  • 442
  • 5
  • 14
  • This could be helpful http://www.thesoftwaresimpleton.com/blog/2014/01/11/custome-link-to/ – nem035 Feb 17 '15 at 18:13
  • This is the example I took for my code at first, but seems to be quite outdated. Actually the jsbin reports some errors in chrome debugger. – Ungue Feb 17 '15 at 20:16

0 Answers0