Questions tagged [hbs]

83 questions
0
votes
1 answer

Not able to fetch data from mongodb and display in .hbs file using node and express

The above hbs file is not fetching data Here the whole code inside each block is not being displayed Here I'm not able to understand what's wrong cause it's not throwing any error And there's no problem while adding books, books are added in…
0
votes
1 answer

How to deploy handlebars(hbs) , Nodejs, mongoDB application

I create a project using hbs, Nodejs, mongoDB ,so I need to deploy it on internet. Can someone tell how to host it using Netlify or railway app, vercel etc. free services
0
votes
0 answers

how i get the selected radio button output in hbs

I want to view the button that is selected/saved in the mongodb document ? {{#if Checked}}
0
votes
0 answers

Radio Button data not getting checked on browser while fetching data from database

while updating the record when I fetch the data from mysql database the radio button is not getting checked, is there any way to do it I tried different methods but was not able to do it. below is the fetch query which needs to be…
0
votes
0 answers

Is there a way to use only 1 tag img in hbs to access different picture?

I'm creating a detail display for the consumer, and I want them to select on an object to view more information like a photo and price, among other things. However, the image remains static. Is there any way for me to obtain a different image for a…
0
votes
0 answers

I have stored the image file using the id of the form data and when i try to display it the image is not loading

this is the hbs file the image doesn't load even when I gave the complete path of the image file including the image name I've tried different types of image files in different folders, but the image seems to load only when it's an link from web.
Sachin K
  • 1
  • 1
0
votes
1 answer

How to access cookies in handlebars?

I want to check in home page that user is logged in or not. I have stored jwt token in cookies. For authentication I want to use cookies in handlebars.
Om Thanki
  • 1
  • 1
0
votes
0 answers

Nest js send email using handlebars with static image

I am trying to send email that has to contain static image. The problem involves the way how to pass src for image. I mean for now I have to provide full path with origin like http://localhost:3000/logo.png and it works. But is this possible to…
0
votes
0 answers

Can we pass multiple object to template in handlebar? if yes then how can I render data in template?

I am passing the two objects to template and It is working fine but I want to use one object in another object. because first one is containing the different data and another one is containing different. Sorry for my bad english and thanks! I have…
Moin Khan
  • 1
  • 1
0
votes
0 answers

not able use the variable of handelebars passed while rendering on html page as variable is array of object

app.post("/search", async (req, res)=>{ try{ const service = req.body.service; const cityup = req.body.city; const city = cityup.toLowerCase(); const state = req.body.state; const registered = await…
0
votes
0 answers

Is there a way to build a handlebars partial path with regex?

I am building a small checklist app with express.js and handlebars.js. The app has a checklist that, on completion and submission, will route the user to a page with a small animation. The animation is in a partial file, called by that page. What I…
kdub1312
  • 803
  • 2
  • 9
  • 19
0
votes
0 answers

How to show a picture with .hbs file?

I have a .hbs page and i want to show a picture in a directory, but i try some code but is not working properly, maybe someone outside can give me a answer. So i do this code: {{#each PhotosFiles}} {{this.PathFilename}}
0
votes
0 answers

How can display index.hbs instead of index.html inside public_html on cpanel

I built my website using a JavaScript template engine handlesbar and it runs perfectly locally but it does not display at all after uploading to the cpanel of my hosting company. However, whenever, I change the index.hbs to index.html, it will load…
0
votes
1 answer

The route GET : /viewpost does not exist. What am I doing wrong?

I am a student and am stuck here. I tried looking for information but could not find any. I appreciate any help. Not sure if this is all that is need, but if you need to see more, please ask. Thanks for all the help/guidance var express =…
0
votes
0 answers

MongoDB not retrieving file name

I'm trying to store images in the project then use hbs to get the name of the image and use it in the img src file path but the name of the file is not getting stored in MongoDB. This is my model: const mongoose = require('mongoose'); const…