I have a Node.JS Express application using Jade. I know how to send data from the backed to the front end using data.render({}). However, I cannot seem to give my jquery file js/script.js to get access to it. How can I pass in data to a front end js file?
Asked
Active
Viewed 2,181 times
2
-
thanks for point me to that – Rob Jun 08 '13 at 22:46
1 Answers
1
Here is the answer
script(type='text/javascript')
var frontEndData = !{JSON.stringify(backEndData)}

Rob
- 11,185
- 10
- 36
- 54