All Questions
2,216
questions
0
votes
2
answers
37
views
Pug can't read array, but only if iterating through it
I am working on a small Web-development project, express with pug as the view-engine, for my University-course. I wish to iterate through an array of Weather-stations, creating a route for every one, ...
1
vote
1
answer
44
views
How do I use a module rendered by the controller with a Jade/Pug template as an argument to an event handler in the Jade/Pug template
I have this module naija passed to a template from the controller like this:
res.render('testing', {title:"filter setting page",
nigeria:naija
...
0
votes
1
answer
29
views
I get null in req.body when submitting data through pug form
this is pug form which is sending data to the requested url
form.form.form-user-data(action='/submit-user-data' method='POST')
.form__group
label.form__label(for='name') Name
...
1
vote
0
answers
37
views
Render block content with pug doesn't work
I'm face off an issue with Pug engine template. I can't inject the content of a Pug file into my layout, nothing is render! I have a home.pug which extends layout.pug, these two files are in the same ...
0
votes
0
answers
15
views
Array send by post form always received as string with first element only in Node js Express with pug
enter image description here
{
name: 'THERAPY 1',
testsuites: '65e93cc4950e6a858809348f',
description: 'UPDATED The pump software shall provide the Maximum Bolus Value therapy setting value ...
0
votes
0
answers
30
views
how to make html div displays as 3 Column in pug
i want to display .course-item as 3 Column the .course-item in inside foreach which gets data from data base to create .course-item div but it all displays as one Column.. how can i fix it
this is my ...
0
votes
1
answer
26
views
A GET request is being fired off instead of the POST Request I've explicitly mentioned in axios
This is my login.js file which is responsible for client-side logging in functionality. My backend code is working fine as evident when I hit the api endpoint in postman and get my jwt successfully.
...
1
vote
1
answer
34
views
Express using default error handling page instead of view?
I'm following this MDN Express tutorial on creating a "Local Library" app, that uses Pug (Jade) as its templating engine. In this part of the tutorial, it details creating a controller for ...
0
votes
0
answers
38
views
Mongoose data not showing on the web page as expected
I am creating a web app for keeping notes using mongodb, node.js, express and pug. When I load the home page the notes are arranged in order of date created. When I click the button to arrange the ...
0
votes
1
answer
80
views
Unable to access a property of an object using Mongoose
Sample data:
{
"_id": "ObjectId_for_Site1",
"name": "Site 1",
"address": "123 Reeganangam",
"manager": {
"_id&...
0
votes
1
answer
87
views
express locallibrary tutorial author names missing from book list
I'm trying to build some knowledge in back end development (because I need it!) after spending a few years on front end, and after a short intro' into Basic Node and Express from the fantastic ...
0
votes
0
answers
37
views
Rendering a new pug template fails in ExpressJS
I'm making a sort of basic search engine and I have 2 pug template files called index.pug (the default search page) and search.pug (search results page) and an expressjs file called app.js that ...
0
votes
1
answer
109
views
Pug template won't render after redirecting to new url
Whenever I attempt to redirect to a new url with query params and then try to render it after, it doesn't want to render. If i take the additional query params off, the page will render just fine.
...
0
votes
1
answer
70
views
Cannot see anything in the console when trying to debug a login function
I am using Node.js with Express as well as Pug templates. I have a login function that is not working. I am trying to debug the code by logging the credentials (email and password) to the console. But ...
0
votes
0
answers
28
views
Nodejs pug form button not redirect and submit
When I fill in the information in the form in the add-product.pug file, the information should appear as a card on the home page and should be returned to the "/" directory as a redirect, ...