javascript - Polymer bind conditional attribute and evaluate attribute -


i wondering if possible using polymer expressions both bind attribute conditionally element while assigning value if bind true?

i know how both seperately:

pattern?="{{someboolean}}"  pattern="{{someboolean ? 'value if true' : 'value if false'}}" 

but have been unsuccessful in accomplishing both without using javascript defined in element's prototype.

any assistance or advice appreciated!

edit:

in above example

if (someboolean) <input pattern="value if true"/> else if (!someboolean) //pattern attribute not bound , attribute assignment not occur <input/> 

you can

<template if="{{ boolean }}">   {{ patterniftrue }} </template> 

however think might changing in polymer 0.8.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -