Most voted "ejs" questions
44 questions
Sort by count of
-
3
votes1
answer408
viewsNodejs - How to use external variables in asynchronous functions
I’m starting to node and I still find the concept of asynchronous functions complicated. I am using and js to render templates to e-mail in my application. The prototype is: "use strict"; const…
-
2
votes0
answers223
viewsHow to check if the EJS is rspondendo
My app is Ode with express and ejs 1 - It is running index.html and not index.ejs 2 I am unable to pass the title or title parameter to the view neither in ejs nor in html app.js and index.ejs are…
-
1
votes1
answer3765
viewsGet information from a url using Node + express + ejs
I set up a url in the following format: localhost:8080/forgetPassword/id/hash I have this route rendering: app.get('/forgetPassword', function(req, res) { res.render('pages/forgetPassword'); }); So…
-
1
votes1
answer720
viewsReact-router not rendering pages not found correctly
I’m developing an application using React + React-router + Express to render to the server and injecting it into an EJS view. It is working properly, but I noticed that when not finding a route as…
-
1
votes0
answers15
viewstake a click event and send it to the backend
Hello I have a question wanted to know how to capture a click event and send to the back end, I thought to do with routes but I think it would not be cool, I am using Node
-
1
votes2
answers708
viewsFormat JSON in EJS
hello personal I am having a problem using nodejs and express, I have never used this language and I do not have much knowledge of it so I will try to be as specific as possible here. 1 I own a…
-
1
votes1
answer563
viewsRescue HTML text from Mysql database with EJS (Node.js)
I am developing a news portal in Node.js where I save the posts in a Mysql database. As a template engine, I use the EJS. Use the Tinymce plugin to format the text of posts (use bold, Italic and…
-
1
votes1
answer589
viewsHow to receive an array in the body of a nodejs route
Good morning, guys. I’m having a really hard time. I started a week ago studying in nodejs, so I’m well. I have a code that returns an object in json format to me and I would like to create a page…
-
1
votes1
answer576
viewsUse javascript inside an EJS file to display array information
I’m trying to show inside an EJS/html file the values of an array that are sent from the server, but I’m not getting it. I know that to show the value of a variable inside an EJS file all I need to…
-
1
votes1
answer487
viewsForm with Node/EJS does not work!
Good morning guys, I’m making a form, using Node and the EJS view engine, however I’m having trouble getting data from the forms in the controller. The return of req.body is always Undefined. app.js…
-
1
votes1
answer1580
viewsEJS include dynamic
Using Express 4 and template engine EJS, I came across the following: Let’s say I have the following structure: meu_projeto/ +-- server.js +-- views/ ¦ +-- layout.js ¦ +-- admin/ ¦ ¦ +-- index.js ¦…
-
1
votes0
answers455
viewsVariable in the EJS
Good morning, everyone! So, come on: I’m trying to use Plotly to generate a bar graph, and it accepts variables. I have a connection on NODE.JS with a database and, NODE.JS in thesis (After a…
-
1
votes1
answer1299
viewsAxios GET Request Response is Undefined
I’m trying to make an Next call in my Node JS Express app and sending the data to my index.ejs file. The problem is that i can see the data in my callApijavascript file but i cant access the…
-
1
votes1
answer1128
viewsPass parameters on express redirect + Node + ejs
Hello, I want to pass parameters in redirect the same way I do in render method, I need it redirect because I do not want to render a page but redirect to the API route that is already rendering the…
-
1
votes2
answers164
viewsNode.js server error (ejs)
hello I have that code: router.post('/loginCli', function(req, res, next) { var j; conn.query('SELECT * FROM bdlabella.tbclientes order by email_cli', (err, results) => { if(err){…
-
1
votes0
answers52
viewsHow to change the state of a variable using Express and EJS?
I am trying to implement a Loader in my application as follows: 1 - seto a variável isLoading para true 2 - faço as requests 3 - seto a variável isLoading para false With this variable I can make an…
-
1
votes1
answer64
viewsHow to display only the first user name in EJS
I’m blogging to train with Ode. In the application, the user registers in the database and, after logging in, goes to his page, where are all his articles. The field in SQL goes as name, and I…
-
1
votes0
answers89
viewsHow to create editable text box over an image (e.g., as in Powerpoint)?
Hello, I’m developing a slide show like Power Point, only in the browser environment with Node.js (ejs, sequelize, etc.) I was able to create the inclusion part of the image and text by sending it…
-
1
votes0
answers13
viewsFormat date field to display on the EJS page with Node.Js
I am using Node.JS to retrieve data from a Mysql table, but I would like the date field to be displayed in the EJS view in the "DD/MM/YYYY" format. Showing "Thu Jul 15 2021 18:00:00 GMT-0300…
-
0
votes1
answer288
viewsPlace EJS files in the Service Worker cache
I wonder how I can curl in the Service Worker the files of . EJS since they are not rendered by the browser, more by the server and only after sent to the browser the . HTML respective.…
-
0
votes1
answer29
viewsEditing images on a crud
I have a CRUD of products which has the name, price, description and 4 images for each. Adding, viewing and deleting I’ve already been able to do. But the issue of editing is catching me on account…
-
0
votes1
answer813
viewsProblem loading static files on routes with nodejs / expressJS
Programming my first system I came across a little problem... I am creating a client system and changed the structure of the views folder as follows: /app /views /customers ejs customers. add ejs.…
-
0
votes2
answers319
viewsI can’t connect Mongodb to Node
I’m trying to make a page on which will have a written form Nome and Comentário, when the person fills in the name and the comment will appear under the form. Only that is giving error. Down here is…
-
0
votes1
answer166
viewsI am unable to edit in CRUD - Nodejs + Express + Mongodb
next: I literally started working with Nodejs + Express + Mongodb today and as an exercise I started with the famous CRUD (Create, Read, Update, Delete). I managed to do almost everything except the…
-
0
votes1
answer611
viewsPassage of values between Express and EJS
I possess a value foo which is obtained in an asynchronous method in a file db.js. The query is being performed normally and I can already capture the variable data foo in my file index.js, but…
-
0
votes1
answer931
viewsHow to send information from an html form to a route? - Nodejs
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form, to send the information typed by the user, for a route and…
-
0
votes1
answer244
viewsWhat is the best/most efficient way to send data from a view to a route using Nodejs and Express?
I am a beginner in Nodejs and am responsible for a project in this tool. I am using the "EJS" engine to create the views. I created a form to send the information entered by the user to a route, on…
-
0
votes1
answer285
viewsHow to use Datatable Plugin (Jquery) with Node.js
I am working with Node and express and need to fill a table with information that comes from an SQL Database. I run my get code from the page that way: app.get('/Home.ejs', (req, resp) => {…
-
0
votes0
answers301
viewsNode and Mongodb connection problems
A few days ago I’m having a problem with a code that I’m having trouble solving. What I’m trying to do at the moment is to register users in mongodb through Node. I am using the view ejs mechanism,…
-
0
votes1
answer373
viewsHow to dynamically assign the selected value of a select with ejs?
Is being sent from the server to this view an object with some information and among them are the values I want to assign to each inputs select, but I cannot assign. I am using ejs as my view…
-
0
votes2
answers295
viewsJavascript variable inside the EJS tag
How to place a javascript variable inside the EJS tag? For example, I wish to make a for by EJS and a if comparing: <% for (var i = 0 ; i < objeto.lenght; i++ ) { %> <% if…
-
0
votes2
answers336
viewsVariable scope problem in foreach loop - Nodejs
I’m trying to get back to the view ejs home/index the vector of objects objArray, but when exiting the foreach loop and doing all processing of the data I am receiving from the bank the objArray…
-
0
votes1
answer552
viewsCalling a javascript function in ejs files
I am trying to create in my js file a function to format a date by changing "-" to "/" and I am using Node.js and express as follows. function formatDate(str){ var format =…
-
0
votes1
answer109
views -
0
votes1
answer33
viewsSend the result of two Mysql tables to a view (ejs)
I am working with Ejs and Node.JS with Mysql. I need to move to a two table info calculation view, but I am facing this error: app.get("/calc", (req, res)=>{ Palpite.findAll().then(calc =>{…
-
0
votes0
answers29
viewsExpressjs: Is he addicted?
Good morning, dear friends, I am with a project in Expressjs where the function is to use a login panel to generate an HTML file with EJS template containing the attributes of the user who logged…
-
0
votes0
answers9
viewsIs there any way to use EJS variables with the express "redirect" method instead of render?
Follow the example of an html page (index.ejs) with a message written "Password check" and a form with an input and a button. I want that, when filling this input with a password and making the…
-
0
votes0
answers24
viewsI want to pass JS variables to an EJS file, how can I do this?
I’ve been trying to chat, and the client’s username is on req.session client. And to show the user’s number in the corner of the screen, I need to take this user’s variable, for this, in index.js I…
-
-1
votes1
answer376
viewsHow to fix button at the bottom of a page without moving?
I have a page with navbar and with a div which contains a logo, a paragraph with text and then a button, all in the same div, each component below the other in the order referred to above. My…
-
-1
votes1
answer78
viewsEngine EJS + Javascript, sharing variables
const express = require('express'); const bodyparser = require('body-parser'); const redis = require('redis'); const fatorialFuncao = require('./fatorial'); const PORT = process.env.PORT || 8080;…
-
-1
votes1
answer113
viewsSyntaxerror: Unexpected Identifier in /Users/apple/Documents/Nodejs/views/index.ejs while compiling ejs
I have a problem running my SQL. When I run on localhost, my code is normal. Follows code. const express = require('express'); const fileUpload = require('express-fileupload'); const bodyParser =…
-
-2
votes1
answer2232
viewsHow do I use EJS with javascript?
I need to pass a content coming from Mongodb’s Collection to my mandatory google maps api function. How would this code go down the right way with EJS + NODEJS + MONGODB? I need to pass an array of…
-
-2
votes0
answers30
viewsExport data to Backend Nodejs
I am doing a project on Nodejs and using EJS as engine and came across a problem when trying to use export to send data from my frontend to my backend. When I take the export line, my formScript…
-
-2
votes0
answers14
viewsMark Check Box in an EJS dynamically through JS
I need to format a JS on EJS so it dynamically marks a check box with the data coming from Nodejs. This is the EJS with the code that is not working: <div class="form-group row"> <label…