Closed rlam3 closed 8 years ago
Is there a better way to use this along with my jinja template with javascript? Thanks
You can generate a JS file with a template, but I wouldn't recommend that generally. maybe look for JSONP or the like to get server-side objects from the client.
It may be a good idea to have this on JSGlue to provide a more transparent interface between Python and Javascript since that's the project's main goal. But I'm afraid that other important features are awaiting. PRs are always appreciated! :)
I'm trying to do this within my imported javascript and it does read it upon page load
var x = {{x.title}}
So javascript must be embedded inside the jinja tempalte itself?