1

I've encountered on a problem with escaping, where I want some parts of code, not being translated by Twig.

Straight to the problem.

Polymer, uses the same marking for variables as Twig, and I'm not sure, if it's possible to escape variable as a Twig's variable and transform it to a Polymer's variable

By Twig's documentation, I've end up with this:

<iron-media-query query="(min-width: 600px)" query-matches="'{{'{{queryMatches}}'}}'">

where it translates to:

<iron-media-query query="(min-width: 600px)" query-matches="'{{queryMatches}}'"></iron-media-query>

The goal is:

<iron-media-query query="(min-width: 600px)" query-matches="{{queryMatches}}"></iron-media-query>
2

You forgot to remove the outer single quotes in your first example

<iron-media-query query="(min-width: 600px)" query-matches="{{'{{queryMatches}}'}}">

Try the raw filter if that doesnt work. More info on it here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.