2

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?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Rob
  • 11,185
  • 10
  • 36
  • 54

1 Answers1

1

Here is the answer

script(type='text/javascript')  
var frontEndData = !{JSON.stringify(backEndData)}
Rob
  • 11,185
  • 10
  • 36
  • 54