Tuesday, 4 April 2017

Handlebars access property of object in .hbs file

I have the following helper function registered:

hbs.registerHelper('user', () => {
    return {
       name:  'Lucifer',
       alt: 'Luffy'
    };
});

and I'm trying to call it like .hbs in the hbs file



This returns nothing.

but when I do I see: [object Object]

How can I use of a property of a object that registerHelper returns?



via Drago

No comments:

Post a Comment