This question must be obvious but I can’t figure it out.
In a template, I link to a js file in my media directory. From that file, I would like to access a context variable like {{my_chart}}.
But is the syntax different?? Thank you!!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think it’s possible this way. If you want to access some data provided by the view, you have to pass it to the js function.
Example
js file:
view
hope this helps 🙂