All Questions
56
questions
0
votes
1
answer
379
views
I am having a problem to convert the following Ejs to pug
I am having a problem to convert the following Ejs to pug
in admin/edit-product.ejs
we can make changes with product already we have it
but But I want to transfer ejs to pug
any solutions
<form ...
0
votes
1
answer
69
views
Implement HTML like template in PUG
I am trying to implement html like template in pug with
#{name}
but this is not working it double prints it then I use pipeline character
|#{name}
but its output is <h1>This Is ...
1
vote
1
answer
85
views
ExpressJS 4.x: simply render index.html with variables (like in Django)
Very simple question I can't find answer for.
Using ExpressJS 4.x I would like to do:
app.get('/', function(req, res) {
res.render('index.html', {name:"Peter"});
});
And then my index....
0
votes
1
answer
686
views
How to check Speed(performance) view engines [pug/ejs/html]
I'm trying to make Web-Server with Node.js.
First of my project using pug for view engine.
But, Web-Designer gives me html, but it's syntax is too different from pug.
So, I want to change my ...
0
votes
0
answers
318
views
How do I implement an EJS template in PUG?
Can someone help me convert this EJS code to PUG? I'm trying to learn PUG and I'd like to implement this piece of code; it's for pagination. Everything works fine in EJS but I haven't quite grasped ...
0
votes
1
answer
332
views
Node JS Pug template loop errors
In a pug template, I tried to print all errors from the error array (if it is defined) with the block of code below:
if errors !== "undefined"
each item in errors
.msgError Error:
...
0
votes
0
answers
49
views
what is the conversion form of jade to ejs
I am having a problem to convert the following jade lang to EJS.
div.error
if errors
each error, i in errors
li.alert.alert-danger #{error.msg}
Would someone please help me out?
0
votes
1
answer
10k
views
Node.js - How to create html tables?
I am trying to create a html table using node.js. I will send JSON data from the server to the HTML page. Then I am thinking of turning this JSON into a table but I couldn't run any of the methods on ...
0
votes
1
answer
102
views
Convert form select box from .pug to .ejs
I'm trying to convert the below from pug to ejs. It's a select box of authors (from an associated collection) in a form to add a book to the db. It throws error "Cannot read property '_id' of ...
0
votes
0
answers
37
views
how to convert ejs template code to jade template code?
convert ejs template code to jade template code:
<% if (theme.leancloud_visitors.enable) { %>
<span id="<%- url_for(item.path) %>" class="leancloud_visitors" data-title="<%= ...
2
votes
1
answer
165
views
How do I convert from ejs to jade?
I want to change the ejs line to pug style.
ejs
<tbody>
<%
for(var i=0; i<rows.length; i++) {
%>
<tr>
<td><%=rows[i].BRDNO%></...
0
votes
1
answer
77
views
Can only http module render ejs to html and pug to html?
in case http module , it have option to encode utf8 but i think there is no option in express module , is it true? there is now way to render by express?
const express = require('express');
const ejs ...
-1
votes
1
answer
3k
views
Convert .pug to .ejs
can anyone help me convert this .pug code to .ejs code?
Thank you all for help
html
head
title= title
body
h1=title
ul
each image in images
li
img(src=image ...
0
votes
1
answer
273
views
Issue with partials using EJS in express
Just to preface: I've recently been transitioning my web development skills from PHP + HTML/CSS to Nodejs, but have been having trouble with templating.
I'm using Express, and after some research ...
1
vote
1
answer
819
views
How to display req.validationError on form
I am trying to validate a sign up page using nodejs/express. What I really want is to display the error messages from req.validationErrors() to display on my form. I am using ejs instead of jade, I ...