I'm working with Ember.js and wondering if there is a built-in function in Handlebars that allows me to print to the console like {{ log "my message" }} similar to what we can currently do with logging objects like: {{ log this }}?


Or do I have to define my helper function every time?

But that is even not working for me (click for jsbin):

I have in the HTML Handlebars:

{{ debug "this is my string" }}

Then in app.js I have:

Ember.Handlebars.helper('debug', function(the_string){
    console.log(the_string);
});

But app.js is not receiving the_string, so the_string is undefined there, what's going on?

Edit
Report