1

i use inline javascript in my jade templates for generating a google map. my problem is: how can i pass variables/objects from the node/express controller into this inline javascript snippet?

any ideas? thanks

1 Answer 1

1

app.js:

app.get('/', function(req, res){ res.render('index.jade', { title: 'My Site', variable: { javascript: 'object' } }); }); 

index.jade:

- var header = 'this is from an ' + variable.javascript; h1= header 
Sign up to request clarification or add additional context in comments.

1 Comment

nope didn't fix it. but have a look at stackoverflow.com/questions/6270832/… please. thank you!

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.