All Questions
129
questions
0
votes
1
answer
48
views
How to Interpolate in Parent by passing locals to Child in PUG
Is there a way to update locals for parent and then use it in child via extends? I have a question regarding the basic example shown on PUG website. See screenshot.
//- layout.pug
html
head
...
0
votes
1
answer
361
views
How can I pass an object key/value pair to a template in Vue?
This is what I have so far -- everything is ok except that the links go to http://localhost:5173/[object%20Object] and I think I've hit a mental wall.
My component:
<template lang="pug"&...
2
votes
1
answer
671
views
How to use a block inside an included file in PUG?
I want to do something like this
//- page-a.pug
extends layout.pug
block scripts
script(src='/jquery.js')
script(src='/pets.js')
block content
include ./layout2.pug
block article1
...
-1
votes
1
answer
269
views
i am not able to render images with pug view template
doctype html
html(lang="en")
head
meta(charset="UTF-8")
meta(http-equiv="X-UA-Compatible", content="IE=edge")
meta(name="viewport", content="...
0
votes
2
answers
1k
views
Pass an include parameter in Pug template from ExpressJS?
I'm new to Pug and ExpressJS and can't figure out how to do a simple thing: passing a template path from Express to Pug.
Here's an example of what I have in mind, with the variable named pageContent :
...
2
votes
1
answer
352
views
how to give dynamic route path in include in pug template
want to make dynamic include
example-
h1
include path/#{object}
or
include path/+{object}+{a:true,b:11}
something like above and if any one know how to do with Mixins in pug please give an example for ...
1
vote
0
answers
89
views
How can you make functional search bar using Jade and Java?
I would like to make a functional search engine where you can search a word and it compares it with a title of a CSV file.
First I tried to make a submit button using JButton and try to combine it ...
1
vote
1
answer
605
views
How to get id of pug mixin into a javascript function with inline onclick
I am trying to make a mixin where multiple counters can be added with different element ids. I have tried a number of things and the closest working example I got is this.
mixin counter(count, id)
...
3
votes
1
answer
975
views
Which template engine for Node.js has best performance when being using in server side?
I want to use Pug in server side as Node.js template engine for my websites, by I afraid worry performance. When we use Pug locally just as HTML pre-processor, performance is not critical, but if Pug ...
4
votes
1
answer
2k
views
How to make the window object available to Pug?
I like the simplicity of Pug, but sometimes it behaves erratically, and it's tough to distill what's the problem. I'm using Node, Express, and Pug (aka Jade), and I need to append my URL (window.local....
0
votes
1
answer
147
views
How to upload images to mysql db and display images from mysql db in pug template engine?
I'm trying to create a form in which users should be able to upload images(I know how to upload and display string, int data types to/from mysql db) and display images from mysql db in pug template ...
0
votes
0
answers
72
views
Refresh user data when value in dropdown is changed
I am using Mongodb, Express, NodeJS, Pug template for my application.
I am querying for all users and passing it to the template. From the front-end, when I hit the route I want to display username ...
0
votes
0
answers
786
views
How work template inheritance for Pug/Jade?
I have problem with template inheritance (more precisely with - block css ).
I have nested templates: template.pug -> index.pug -> contactContainer.pug
Every file has block css. And template.pug get ...
0
votes
1
answer
63
views
app.get() cannot find and show the right template(jade) page
I am studying about very basic Serverside JS using express, jade, node.JS.
At the first page (localhost/topic), there is a list. And List's data from MySQL.
(MySQL fields are id, title, description,...
0
votes
2
answers
1k
views
express/pug loop to generate table with form per row
Im just starting out with node.js/express/pug but i cannot get it to produce a form per row.
i have this template
mixin listentry(alternate,name,exposureTime,manufactor,usecount,lastused)
tr()
| ...