Questions tagged [express-handlebars]

474 questions
-1
votes
1 answer

Building an App Shell For My Service Worker to cache using Handlebars

I am building a PWA using express-handlebars. I'm trying to follow the Google design practices and build an app shell in order to cache with a service worker. However, I'm a little stumped since Handlebars is a template engine which generates html.…
-1
votes
2 answers

How to iterate over an array inside an object (handlebars)

I am trying to iterate over an array that is part of an object. Below is my user schema var UserSchema = new Schema({ username: String, email: String, password: String, company: String, contact: Number, country: String, …
mysamza
  • 387
  • 1
  • 6
  • 22
-1
votes
1 answer

How to iterate over an array of class objects in Handlebar?

I have an animal array: var animals = [new animal("giraffe", false, 4), new animal("zebra", false, 8), new animal("lion", false, 10), new animal("dog", true, 4), new animal("cat", true, 2)]; How do I pass it to the handlebar and iterate it ?…
Hoang Minh
  • 1,066
  • 2
  • 21
  • 40
-1
votes
1 answer

How to design layout page in express js?

I need to create static layout page in express js using handlebars. Layout will have header (contains username and company logo) and footer (contains copyright info). Hence the layout page should be common for all the pages in the route and only its…
Dhya S
  • 143
  • 2
  • 14
-2
votes
1 answer

I'm working on a CRUD system which include login and registration form. I'm unable to retrieve user first_name or last_name after successful login

Below are codes for my Register Controller, Register Route, Login Controller, Login Route and my Home page(handlebars) where i would like to display user first name etc.... Everything is working fine but it is not displaying user information after…
-2
votes
1 answer

script source not found. Error internal server 500 (node, express-handlebars)

I'm stuck with this stupid error 500 because my custom js scripts wont load. I'm running a node.js server locally with express and express-handlebars. here it is my app.js file const express = require('express'); const { engine } = require…
-2
votes
1 answer

Using nodejs and handlebars

Hi everybody I'm kind new in nodejs problems I hope o can found what I need as simple as possible So my base problem is how can I use multiple handlebars files in one handlebar page as sections Like to have a page for the headear and another for the…
-3
votes
3 answers

How to force Express JS to serve files from the same directory regardless of route?

I am writing an express app that uses a template engine called Handlebars. The html files it serves contain images that point to certain places in my root directory. This works fine for surface-level routes such as "http://localhost:5000/image" or…
1 2 3
31
32