I work with Ember.js and wonder 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 journal objects like : {{ log this }}
Or do I need to define my helper function every time ?
But this does not even work for me ( click for jsbin ):
I have in 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 does not get the_string , so the_string is undefined, what happens?
source share