In the flask environment, whether you use angluar's ng-repeat; or vue's loop to traverse v-repeat, v-for; such an error will be reported, please solve it
<ul>
<li ng-repeat="x in time">
{{x.medicine}}
</li>
</ul>
Error message:
jinja2.exceptions.UndefinedError
UndefinedError: 'x' is undefined
It looks like this. Jinja’s template uses {{}} to output variables, and angluar does the same. So when you want to output a variable, you have to consider who outputs it. If it is angluar output, you need to compare it. Bracket escaping, output the curly braces into html instead of being filtered out by the template engine
http://jinja.pocoo.org/docs/dev/api/#jinja2.Environment
http://lorenhoward.com/blog/how-to-get-angular-to-work-with-jinja/
Just write it like this