pug Questions
4
Solved
I have a jade template for my node.js project. I would like to send an object to the jade template and pass it to a function inside the page (to render something).
I am sure I send the right stuff...
2
I am trying to run sparkleshare-dashboard which is an open source. Up till now i got many errors because i have no fimiliarity with the technology used in it. So, this time when i run app.js from c...
1
Solved
how do you make an image a link in Pug I've tried
a(href='https://github.com/LouieAdamian') img(src="/img/GitHub.png")
and
img(src="/img/GitHub.png")
a(href='https://github.com/LouieAdamian')
...
5
Solved
When I load my Express webpage I'm getting the following error:
Express
500 Error: /app/views/index.jade:114 112| td 2 113| td 4 years > 114| input is self closing and should not have content.
1...
8
Solved
I have this jade code:
p
| Avatar hosted by
a(href='http://www.gravatar.com/', target='_blank') Gravatar
The problem is, it's rendered to
<p>Avatar hosted by<a href="http://www.grava...
2
Solved
I'm starting to experiment with nodejs/expressjs/coffeescript and the jade view engine.
I have the following setup which from what I can see from the examples that are around seems pretty standar...
3
Solved
How to debug print an object from jade,Like console.log() in javascript
3
Solved
Is it possible to create a Jade mixin, which reads a file from the file system, and echoes it into the rendered HTML?
I tried this...
mixin svg(file)
- var fs = require("fs");
- var xml = fs.re...
Matteson asked 28/5, 2014 at 9:17
1
Solved
I'm developing nodejs application and I have issue with include statement.
It works when I use it like this:
include ../mixins/root.pug
...but is it possible to use variables on include?
None ...
Sutler asked 8/5, 2016 at 0:24
4
I am receiving this error when trying to delete a document from the database:
Cannot GET /delete/532fa5e56f885c7fec5223b1fds
How can I successfully delete the document?
app.js
//Delete
app...
Homothermal asked 24/3, 2014 at 4:56
1
Solved
I have an url like this: http://localhost/editblog/58a5da1df3ec9614fc9893d3
and code in pug like this:
input.form-control(type='hidden', name='id', value='')
The question is how to get the val...
3
Solved
How can I use an object that I've passed through to jade within an image, I'm also using mongodb to hold the data.
Currently this is my code:
db.collection('blogposts', function(err, collection) ...
Isolated asked 4/8, 2013 at 4:16
2
Solved
I don't find a lot of stuff for Pug / Jade templating, so I try here.
I've been reading the documentation for iterations and also this link here.
I'm working with Node.js, Express, and pug. So far...
Ampereturn asked 25/1, 2017 at 16:1
2
Solved
I have a following mixin in Jade:
mixin indicator(slide_to, active)
- active = active || '' // this is an ugly method to create a default value
li(class=active, data-target='#' + CAROUSEL_ID, da...
Holloman asked 22/11, 2013 at 7:53
3
Solved
Is there a better way to capitalize the first character of a string in Jade than this?
for list in project.lists
- list.name = list.name.charAt(0).toUpperCase() + list.name.slice(1);
li #{list.n...
1
Solved
I want to write my pug array in multiple lines like this:
- var data = [
["1", "1.1"],
"2"
]
but pug doesnt allow it. I have to write it inline like this atm:
- var data = [["1", "1.1"], "...
Lawler asked 17/1, 2017 at 0:8
3
How can I get the templateURL to reload when saved using LiveReload and Grunt?
angular.module('meshApp', [
'ngSanitize',
'ngRoute'
])
.config(function ($routeProvider) {
$routeProvider
.when(...
Silverweed asked 8/1, 2014 at 2:4
2
Solved
I am passing in a session variable from my mongodb session store in an Express for Node.js web app like this:
exports.dashboard = function(req, res){
res.render('dashboard', {pref: req.session.la...
1
Solved
I am working with Pug and I wanted to create some mixins to make some reusable components across whole project. I wanted to create some files just to make mixins separated and categorised. The prob...
2
I'm running into some funny stuff with the view cache in express/Jade. The controller fetches an article from MongoDB via Mongoose and hands it to the res.render function. However, after running fo...
3
Solved
I'm fairly new to Jade and am wanting to display some outputted data as the value value of a text input. Like this:
input(type="text", name="date", value="THISRIGHTHURR")
But only the value need...
Metzler asked 23/1, 2014 at 6:24
2
Solved
I want to pass my data-object to jade files, but but it is impossible
My jade-loader:
{
test: /\.jade$/,
loader: "jade",
query: {
pretty: true,
locals: {
name: "Georg"
}
}
}
plugins:
pl...
6
I've got the following:
div.div
p.paragraph
| about 3 lines of text... (dynamic)
button.button-i-want-to-center
| click_me
I want it to look like this:
___________________________
| Text......
1
Solved
I need to create div's with class pixel-1,pixel-2... pixel-n and my question is how to achieve it with pug. I tried this:
- for (var x = 1; x < 13; x++)
.pixel-x=x
but it's generate css lik...
2
Solved
I tried making comments in Jade/pug, but the comments render as text in the HTML. This is my code:
doctype html
html(lang='en')
body
/ This should be a comment
What am I doing something stupi...
© 2022 - 2024 — McMap. All rights reserved.