All Questions
Tagged with pug javascript
2,392
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
43
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
0
answers
17
views
pug/uikit nav sidebar lost left padding after uikit upgrade
I forked from this https://github.com/chekromul/uikit-ecommerce-template
to build a static github page.
but after I upgrade uikit to latest version, the side navbar lost its left paddings.
before I ...
1
vote
0
answers
21
views
How can I use the selected option value of a select element in Pug/Jade template
I have this select in Pug/Jade
select.form-select.col-xs-12.col-sm-12(id='selState1', onClick='+setState(selState1.value)')
option(value='selState1', name='selState1',id='selState1') ...
0
votes
0
answers
46
views
How do I add structured data json script to Pug JS
I am trying to add in a script of json that is structured data for SEO into my Pug JS file. I am doing it the same way I do JavaScript with type="text/javascript", but it does not compile ...
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 ...
-3
votes
1
answer
63
views
I am building an app where I want the admin to update any user who are displayed in the admin panel
I am a beginner and got stuck in this problem. I am building an app where I want the admin to update any user who are displayed in the admin panel by clicking on the update button at the bottom of the ...
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
247
views
How to integrate Vite into an existing old express app with pug templates
I have an old code that uses Express and renders HTML with pug.
It uses plain js files and imports them like:
script(type='text/javascript' src='js/test.js')
They use jquery all around those js files.
...
0
votes
0
answers
38
views
Cant use pug module with parcel?
I am trying to rendering the content with the pug template but I cant import the pug modules into this file, i'm using parcel to bundle all the js file also.
Here is the code:
import html from ".....
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
107
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
68
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, ...