6,472 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
Advice
0
votes
2
replies
66
views
How to use contentFor() in express ejs layouts?
I have been trying to find a video or explanation on how to use contentFor(). I already read the documentation, but it is still not working.
A view:
tyler
<%- contentFor('foo') %>
club
<%- ...
1
vote
1
answer
46
views
Is my index.ejs template forEach supposed to drop a closing paren?
Given:
<ul>
<%= users.forEach(function(user){ %>
<li><%= user.name %></li>
<%= }); %>
</ul>
and:
app.set('view engine', 'ejs');
app.get('/', (req, ...
1
vote
1
answer
136
views
CSS Flexbox Issue
I have a container with multiple items displayed using CSS Flexbox, with flex-wrap: wrap and justify-content: center so that the items are visually centered and wrap responsively. Each item has a ...
Advice
0
votes
1
replies
37
views
Deploying embedded Javascript to a remote server
I am an experienced programmer, but am new to Web Development. I have become familiar with several technologies, including embedded Javascript, which I would like to use for my employer's project. ...
1
vote
1
answer
59
views
EJS including static html pages from "public"
I'm trying to include an html file in my ejs templates. Not working.
Everything else works.
Tried a million different paths in my Include
Wrong approach? Wrong syntax? Use the "path" ...
0
votes
0
answers
36
views
EJS error: include is not a function when using <%- include('partials/sidebar', { user: user, page: 'invoice' }) %>
I'm working on an Express + EJS project and getting this error when rendering my invoice.ejs view:
TypeError: C:\Users\naray\OneDrive\Desktop\Invoice-saas\invoice-generator\views\invoice.ejs:17
>&...
0
votes
2
answers
152
views
CSS page counters not visible in generated PDF using @page rule
I'm developing a feature to generate a PDF health report from an EJS template. I'm trying to add page numbers (e.g., "Page 1 of 10") to the footer of each page. I'm using the CSS Paged Media ...
0
votes
0
answers
75
views
Possible to add default class to a mongoose Schema?
A of class="active" is added based on what star I click on. With schema, how do I connect it to the db, creating a default 1 star to every post? Tried to do it with "score:" but ...
0
votes
0
answers
38
views
issues with google oauth2 access token
So i am new to programming so pardon me. I am building a blog app with ejs and node js that has a google sign in functionality through passport js.. the functionality works, however when i click on ...
2
votes
0
answers
77
views
How to send form data in correct data type format with Express.js
I have this form which has various input types:
<form action="/listings/create" method="post">
<fieldset>
<legend>Informacije o zgradi</legend>
&...
0
votes
0
answers
60
views
My browser is not showing some of the content i write inside my ejs file
i am working on a full stack web developement project and i'm stuck where localhost:3000 in my browser can't show the before and after mentioned in the layout.ejs file, which are outside the <%- ...
0
votes
0
answers
80
views
How can I access variables passed with res.render EJS (from NodeJS) in my script.js File
I am trying to access my header variables sent from NodeJS in my script.js file.
I can successfully pass the variables into my EJS templates and use them there; however, I can find a way to access the ...
0
votes
0
answers
92
views
When submitting data through an EJS form, all data get returned as "undefined"
I'm currently trying to make a login and signup form using EJS, Express, Node, etc. However Whenever I submit data from a form, all data is being returned as "Invalid"
I've checked my user ...
-1
votes
1
answer
89
views
Node / express / ejs / Uncaught SyntaxError: missing ] after element list
I'm running a express server and render a list.
This is the code of the route:
try {
let result = await servCollections.prepareDataForListCollections();
let colls = result.data;
let ...
0
votes
1
answer
56
views
Ejs won't allow me to project import statements in my template
I'm trying to make my component generator more flexible by adding in an option to make it a custom form control. I have the options set up in the schema along with an x-prompt object to provide the ...
Optiq's user avatar
- 3,354