0

I would like to pass a Jinja2 variable into a .js file. Then call the file from my page. Is that possible.

example:

test.js file

alert('{{myFlaskVar}}')

page.html

<script src="/static/scripts/test.js"></script> //but pass the myFlaskVar
Mike C.
  • 1,761
  • 2
  • 22
  • 46

0 Answers0