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
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