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,438
  • 68
  • 55
  • 126
Rob
  • 10,467
  • 10
  • 34
  • 54

1 Answers1

1

Here is the answer

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