I currently have an Ember object that looks like this:
name: 'Bob'
xs: {
'actual':50
'target':55
}
I have about 5-6 fields similar to xs. I need a helper method that can take this xs object and then return if the target has been deleted.
I thought about it:
Handlebars.registerHelper('hasHitTarget', function(attribute) {
if (attribute.actual >= attribute.target)
{
return block(this);
}
});
{{
{{
Target Hit
{{/hasHitTarget}}
{{/each}}
Everything I read on the internet says this should work. But this is not so. When I console.log(attribute), it returns user.xsas a string. What's happening?
source
share