In 0.7.2, I could have something like this
<span>{{color 'blue'}}</span>
Handlebars.registerHelper('color', function (parameter) {
return Session.equals('color', parameter) ? 'blue' : 'red';
});
and it would work perfectly fine. What is the equivalent in the 0.8.0 release? I know they replaced Handlebars.registerHelper with UI.registerHelper, but this
UI.registerHelper('color', function (parameter) {
return Session.equals('color', parameter) ? 'blue' : 'red';
});
still returns this error
Exception in Meteor UI: Error: Can't call non-function: [object Object]
Any help?
Turns out it was all because one of my registerHelpers was the word 'parent'. Using that threw an error so it made it seem like all of my helpers were messed up. I'm guessing that it's a reserved word.