Questions tagged [hbs]

83 questions
0
votes
2 answers

Cannot find module 'hbs', Handlebars template engine

I don't know why it gives this error. I have also set view engine to hbs using app.set(), also defined path of views (path is correct, no error there). But it still says cannot find module hbs (it is already installed) when I try to render. You can…
user16486258
0
votes
1 answer

The cards do not form rows inside the class row

The cards rendered in each are not aligned correctly, because instead of aligning horizontally they are aligned vertically (which I don't want). It is very strange that this happens because I have made many similar rowr classes that contain exactly…
user16284023
0
votes
1 answer

How to access to the elements of HashMap in HandleBars (hbs) file for Rust

I have a variable defined as HashMap in rs file: sampleDir: HashMap and is initialized as the following (for example), it's two dimensional: First Second aa ba ab bb ac bc sampleDir:…
cnm
  • 113
  • 11
0
votes
1 answer

I am trying to use handlebars but while rendering in server.js file its always showing me res.render is not a function in browser

const express = require('express'); const dotenv = require('dotenv') const morgan = require('morgan') const bodyparser = require('body-parser') const path = require('path'); const app = express(); dotenv.config({path: 'config.env'}) const PORT =…
0
votes
1 answer

handlebars partials are not seen

I need to import hbs to use partials, but import * as hbs from "hbs" doesn't work, I use nest.js Error: The partial header could not be found my code: async function bootstrap() { const app = await…
Ekaterina
  • 11
  • 1
0
votes
1 answer

blank bootstrap cards are showing before my db images

I've got an online store webpage using nodejs, express and mongodb so i have uploaded the image url's, title, description... into my database but the problem is that on webpage it is showing 2 black cards before each image i will show you guys the…
0
votes
2 answers

Alert does not close when trying to close it

I have an alert that has two problems, the first one is that it does not close when I click on the "X" button. I am using Bootstrap 5 This is the code {{#if success}}
user16284023
0
votes
0 answers

how to select multiple value handlebar

I have a table like this.I want to fetch it inside the select tag but it's not working exactly what i am looking. I have register handlebar custom helper selectOption(status, options) { return options.fn(this).replace(new…
0
votes
2 answers

Get the 'card-title' to start just above a div

I want the 'title' to start right above 'first yeah', the image should also start there I've tried several ways (and with some classes) but I haven't succeeded The card code:
user16284023
0
votes
2 answers

TypeError: hbs is not a function

I was doing a nodejs based project using express and when I was adding partials to the app.js file. I got a type error: TypeError: hbs is not a function. I installed npm express-handlebars module. then also showing error again. how to fix it. i also…
0
votes
1 answer

fomantics-ui change theme settings

I have fomantic-ui 2.8.8 installed on express 4.161. I'm pretty sure fomantics is working, since in header.hbs I changed the line:
0
votes
0 answers

In HBS how do I display other variable's data inside foreach

Inside a foreach loop in HBS I am trying to display the data which is inside a different variable. Here's the route and the data which is being passed to the hbs: const info = [ { name: "kakashi", age: 22, gender: "Male" …
Kakashi Hatake
  • 133
  • 1
  • 9
0
votes
1 answer

Handlebars each loop not working despite all other objects working just fine

I have a section of an application which: Makes an API call to send a JSON object back to the client. One of the properties of this JSON object is a simple array of strings. Uses handlebars.compile to display this data back to the user. Here is…
0
votes
0 answers

Restrict handlebars-partials for spedific pages

How to restrict handlebars-partials while rendering specific pages ? Or How to enable handlebars-partials while rendering specific pages only ?
0
votes
0 answers

It works when I put '.handlebars' at the end of the document and it doesn't work when I put '.hbs'

It doesn't work when I make '.hbs' at the end of the handlebars document. Shouldn't it normally work? index.handlebars (working) index.hbs (dont working) image webpack is handlebars-4.0.6.tgz