My index.js
file:
res.render('index', {data:{'hello':'world'}});
my jade file:
p #{data}
script(src="/javascripts/app.js")
This prints the value json object.
now on my app.js
file console.log(data);
gives an error saying data is undefined.
How can I access the data which was passed from my index.js file in my javascript file.