How to make Angular work with Jinja templates

I use Jinja templates for my frontend development. When trying to use Angular code it failed as it tryied to compile it as Jinja.

In order to avoid conflict simply wrap it in a raw Jinja block. This will leave the curly braces intact when compiling the template.

{%raw%} <input type="text" ng-model="yourName" placeholder="Enter a name here"> <h1>Hello {{yourName}}!</h1> {%endraw%}

Leave a Reply

Add <code> Some Code </code> by using this tags.