Console.log in spacebars? [Solved]


#1

Can’t find answer anywhere and

 {{ console.log something }}

doesn’t work


#2

html:

<template name="page">
  {{log something}}
</template>

js:

Template.registerHelper('log', function(what) {
  // You can use `this` and/or `Template.instance()`
  // to get template data access
  console.log(what);
});

#3

Yes, I was just about to post this same solution!