Questions tagged [embedded-javascript]

Embedded JavaScript templates for node

Embedded Javascript is a template with JavaScript code embedded.

Anything inside the tag <%...%> is executed as JavaScript code, and anything inside the tag <%=...%> is replaced by the evaluated value.

Highlights :

HTML string concatenation without the messiness.

Easily load templates from separate files.

Rails-like view helpers.

Template caching and partials.

Intelligent error handling with line numbers.

References :

  1. Embedded JavaScript homepage

  2. Embedded JavaScript @GoogleCode

  3. Embedded JavaScript @GitHub

55 questions
0
votes
2 answers

display html text in database occur error

I'm developing a web app using ExpressJS, MySQL, EJS. I save data in database with HTML text. Then, I get data from database and show into web, an error occur: HTML text show instead of plain text. Output:

Theo thông lệ, cứ mỗi lần xuân về chúng…

Huệ Phan
  • 11
  • 2
0
votes
1 answer

Visionmedia EJS on Client side ( Cordova / PhoneGap )?

I've been developing a Cordova application. I know the Visionmedia EJS is a server-side tool. Can I use Visionmedia EJS on client side without node.js? For instance I want to create 3 part for my application. The parts are layout.ejs,…
efkan
  • 12,991
  • 6
  • 73
  • 106
0
votes
1 answer

display article in database but it has html tag

I'm creating a web using nodejs, ExpressJS, EJS and MySQL. I save some data with HTML code in MySQL. When I get data from MySQL and show in web,an error occur: HTML tag in data also showing with data. How can you help me solve this problem. Thanks.
Huệ Phan
  • 11
  • 2
0
votes
1 answer

Using bootstrap css in Sails.js

I just started learning Sails.js and am trying to make a simple application. I have a tag linking to the bootstrap cdn in my layout.ejs. After certain changes to certain files I get this message. excuse my interruption, but it looks like…
mikeLspohn
  • 495
  • 1
  • 8
  • 21
0
votes
1 answer

Express making mongodb data available in route

This seems like a relatively simple issue, but I can't seem to find good documentation. I'd like to pass json data from mongodb into a route, so that it is available in my ejs template. My schema is: var GiveSchema = new Schema({ title:…
byrdr
  • 5,197
  • 12
  • 48
  • 78
0
votes
0 answers

using parameters in url causing included files to be downloaded from same url

I want to get parameters from url and display content based on the parameters. I am using express 4 here is my code app.set('views', __dirname + '/views'); app.set('view engine', 'ejs'); app.use(express.static(__dirname +…
sarfarazsajjad
  • 1,208
  • 2
  • 17
  • 30
0
votes
1 answer

How does one use ejs with node-webkit

in package.json { "name": "_dubs", "version": "0.0.0", "description": "GAME", "main": "views/index.ejs", ... the app gives me this error "SyntaxError: unexpected token <" Which I assume to be an issue due to ejs! (embedded js)…
bezzoon
  • 1,755
  • 4
  • 24
  • 52
0
votes
1 answer

ejs templating engine with express 4, foreach fuction for object don't work

I use ejs 1.0 and express 4 and i have problem with iteration. I try to use forEach for my object returned from database (mysql). This is my code for express: var express = require('express'); var app = express(); var bodyParser =…
Lukasz Migut
  • 192
  • 1
  • 3
  • 9
-1
votes
1 answer

Why are my variables not updating in node.js?

I have built a webapp with node.js to receive messages from an SNS topic via POST request and log them to the console then display them on the webpage, if I publish a message to my topic I get the message printed in the console but nothing updates…
user7496277
-1
votes
1 answer

Can we use the express4 with underscore.js?

Can we use the express4 with underscore.js? I want to print the variable "name" in index.ejs Is it possible? In underscore.js capabilities Express4 Is there another method to use with node.js? PS: underscore.js, express4 ( engine ejs…
wikont
  • 55
  • 1
  • 7
1 2 3
4