<template repeat if="{{ conditionalValue }}">
Repeat if and only if conditionalValue is truthy.
</template>
However, things work a bit differently inside a Polymer element, and I haven't been able to get this form to work. Does anyone know if `repeat if` works inside a Polymer element?
Thanks,
ArthurFollow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CADSbU_x4PoEL4bN9VjnvztPG3phASZ6GSG%3D%3Dsg7DBXRzzEWjpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
<ul>
<template repeat="{{s in salutations}}" if="{{ salutations.length }}">
<li>{{s.what}}: <input type="text" value="{{s.who}}"></li>
</template>
</ul>
I tried if="{{ true }}" at first. Then I checked the expressions doc and realized that "true/false" weren't listed as accepted literals.
However, I also found that if="{{ 1 }}" didn't evaluate as truthy, but if="{{ 1 == 1 }}" did. That seems like a hiccup in the expression library (but it might be just another gap in my understanding).
Having a separate variable, this.showSaluations and using if="{{showSalutations}}" also worked as expected.
My other confusions apparently related to my not getting the scoping correct. Fixed that.
Thanks,
Arthur
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CADSbU_ym0EWwnchmAnvfdHumRvYh9cO411V66qtT-rHMqTLGXg%40mail.gmail.com.