Skip to content
Advertisement

Tag: handlebars.js

Error: Cannot GET using Express & handlebars

I’m new to JS/Handlebars and I’m unable to display an image from my home.hbs file in VS Code. When I run the server, I get this: Here’s my server code: My “home.hbs” code: The “GET” error specifically states Cannot GET /public/img/logo.png That’s all the info I have, any help would be much appreciated. Answer Specify the path prefix for the

Handlebars re-compile templates

I’m working with handlebars and I have this situation. I do a request to a server, and get all the data I need to put it on the views. I use handlebars to put that data, and have no problem. Now, I need to do the request every 1 or 2 minutes. But when I’m going to put the data

Logical operator in a handlebars.js {{#if}} conditional

Is there a way in handlebars JS to incorporate logical operators into the standard handlebars.js conditional operator? Something like this: I know I could write my own helper, but first I’d like to make sure I’m not reinventing the wheel. Answer This is possible by ‘cheating’ with a block helper. This probably goes against the Ideology of the people who

Advertisement