pug Questions

7

Solved

I am using Jade and everything is cool except that Jade "eats" my spaces. For example, in HTML: <b>Hello</b> <b>World</b> or <b>Hello</b> <b>World<...
pug
Milky asked 22/12, 2013 at 7:49

4

Solved

I want to create attributes on the fly for some html elements. In my case I'd like to set (or not) a disabled attribute according to user.role. So, if user has permission to edit some field, I do...
Tarmac asked 27/11, 2012 at 20:37

23

Solved

I have a button "Choose file" as follows (I am using Jade but it should be the same as Html5): input(type='file', name='videoFile') In the browser this shows a button with a text next to it "No...
Colier asked 14/4, 2013 at 16:48

4

Solved

I am getting the above error when running the following code in my express app. When I go to localhost:3000/cards. This is in my cards.js file. const express = require('express'); const router = ex...
Qualitative asked 10/3, 2018 at 14:22

2

I have an issue when using Tailwind CSS v3.0.18 arbitrary values in pug files. I followed this answer but it doesn't solve the issue. Here is my pug file: .container.mx-auto.flex.items-center.space...
Raymund asked 13/2, 2022 at 3:55

6

Solved

I'm trying to get a server set up with socket.io, with bad results. I am mostly following this guide, although it's somewhat out of date: http://www.williammora.com/2013/03/nodejs-tutorial-buildin...
Shantishantung asked 17/7, 2014 at 0:58

21

Solved

Note: my auto answer at end of the post I'm trying to make a better experience of nodeJS and i don't really like to get all the script in one file. so, following a post here i use this structure ...
Staff asked 18/4, 2012 at 19:18

7

Solved

i need your help, i'm trying to display some datas from my firebase but it trhows me an error like InvalidPipeArgument: '[object Object]' for pipe 'AsyncPipe'. There is my service: import { In...
Claudieclaudina asked 1/7, 2017 at 23:5

3

Solved

I'm trying to pass an object with circular references from node.js server to client-side javascript. Server (node.js): var object = { circular: object } //.... app.get('/', function(req, res){ ...
Fionafionna asked 16/4, 2014 at 18:34

5

I can't solve this for almost four hours, and i can't find any helpful documentation for this kind of problems. This is the issue, I'm using pug/jade templates and i want to call function inside pu...
Capet asked 8/5, 2017 at 1:35

4

Solved

Scenario: I had developed some transactional pages using Node.js, Express + Handlebars as view engine and MongoDB. Now the issue is during module integration I got some of the pages which are buil...
Ize asked 25/2, 2013 at 8:57

3

I am new in Node.JS stack. I saw a big number of developers are using pug template engine (Express JS) instead of regular HTML. If anyone of you have used pug can you please tell me the major bene...
Stronski asked 18/9, 2019 at 12:17

7

mapboxgl.accessToken = 'xxxxxxxx'; var map = new mapboxgl.Map({ container: 'map', // container ID style: 'mapbox://styles/mapbox/streets-v11', // style URL }); doctype html html head bloc...
Amando asked 16/3, 2021 at 7:47

8

Solved

The question is as given in the title, ie, to access element whose parent is hidden. The problem is that, as per the cypress.io docs : An element is considered hidden if: Its width or heigh...
Atwood asked 29/11, 2017 at 11:23

3

Solved

I am having trouble finding a good solution. The problem is I want a dynamically updated active class on my nav items, however I don't know how to do so. Can anyone help me with a solution for givi...
pug
Mother asked 15/8, 2017 at 18:38

4

I'm trying to build a demo app using Node and I keep getting Uncaught TypeError: fs.readdirSync is not a function error when trying to use the Nutrionix NodeJS Client Library (https://github.com/nu...
Pause asked 12/1, 2016 at 4:58

15

Here is my index.js file: const express = require('express') const app = express() app.set('views', __dirname + '/views'); app.set('view engine', 'pug') app.get('/', function (req, res) { res.r...
Geometrid asked 27/7, 2017 at 5:47

11

Solved

I am very new to Node.js and I tried to run a project (made by other developer) by having a command in terminal node app.js. But I encountered below error, do you have any idea how to run this proj...
Bike asked 3/3, 2014 at 2:15

3

Solved

I have a button, clicking on it should show/hide some area. button(ng-click="areaStatus='on'") .area(ng-class="areaStatus") I want not to just use ng-show/ng-hide and then assign it to Boolean a...
Madoc asked 28/8, 2013 at 20:17

7

I am trying to generate an express skeleton, using the express generator. So it would be this: $ npm install express-generator -g However, it adds a bunch of automatic jade files. I was wonde...
Andryc asked 4/6, 2015 at 2:40

1

Solved

I have following vue component. <template lang="pug"> button(@click="onLogout") Logout </template> <script setup lang="ts"> function onLogout() { /...
Pollinosis asked 30/4, 2022 at 18:47

6

Solved

So I have this basic pug code p This is some text span foo span bar The expected output would look like this: This is some text foo bar However it actually outputs this (white space is remov...
Procreate asked 5/5, 2017 at 8:26

6

Solved

Is there a way to do this inline in a jade template? if(typeof fromEdit != 'undefined') div#demo.collapse.in else div#demo.collapse Would like to do this conditional check "inline" and the res...
Aeronaut asked 3/1, 2013 at 17:45

9

Solved

How do we write a long attribute value over multiple lines in Jade / Pug? SVG paths tend to be really long. We want to write an attribute value over multiple lines to help with readability. For exa...
pug
Torgerson asked 26/7, 2013 at 3:44

12

Solved

I'm pretty sure that this is a no-brainer but I didn't find any snippet of sample code. What's the best way to insert line breaks (aka the good ol' br/)? As far as I can see if I put a "br" at the...
Statued asked 25/3, 2011 at 14:43

© 2022 - 2024 — McMap. All rights reserved.