You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a large angular app that I'm converting to have some partials delivered by nunjucks server side.
Obviously both angular and nunjucks both use the double curly syntax when rendering variables
{{variable}}
How do I escape the curly braces from nunjucks so they are printed in the rendered HTML?
I know you can do it with the following syntax but I find this rather clumsy for doing it inline, as with so much of angular's implementation
{% raw %}
{{someAngularVariable}}
{% endraw %}
In the Laravel Blade templating engine, they use a syntax like this:
@{{someAngularVariable}}
which escapes and simply renders {{someAngularVariable}} in the HTML. Is there a similar short syntax that will allow this?
Many thanks
The text was updated successfully, but these errors were encountered:
Why was this issue closed? I think it should be re-opened with the intent of adding short syntax like @tyronedougherty mentioned.
This would particularly be great for email templates where using nunjucks to build your own templates, then wanting to still send {{ variableName }} to the email provider that performs further substitutions.
I've got a large angular app that I'm converting to have some partials delivered by nunjucks server side.
Obviously both angular and nunjucks both use the double curly syntax when rendering variables
How do I escape the curly braces from nunjucks so they are printed in the rendered HTML?
I know you can do it with the following syntax but I find this rather clumsy for doing it inline, as with so much of angular's implementation
In the Laravel Blade templating engine, they use a syntax like this:
which escapes and simply renders {{someAngularVariable}} in the HTML. Is there a similar short syntax that will allow this?
Many thanks
The text was updated successfully, but these errors were encountered: