Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

polymer 1.0 how to use dom-if ? #1828

Closed
sujkh85 opened this issue Jun 11, 2015 · 1 comment
Closed

polymer 1.0 how to use dom-if ? #1828

sujkh85 opened this issue Jun 11, 2015 · 1 comment

Comments

@sujkh85
Copy link

sujkh85 commented Jun 11, 2015

Please understand I do not speak English.

  <template is="dom-if" if="{{ img_Path ==='./images/text-received.svg' }}" restamep="true">

How to use conditional yo Didn't?
only if = boolean?

thank you

@arthurevans
Copy link

You can't use an 0.5-style expression inside the if= -- you need to replace your expression with a computed binding, like:

if="{{showImage(img_Path)}}"

See, for example: http://stackoverflow.com/questions/30607379/polymer-1-0-binding-css-classes/30607783#30607783

This is described in the migration guide under data binding:

https://www.polymer-project.org/1.0/docs/migration.html#data-binding

@sorvell sorvell closed this as completed Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants