How to use polymer to format input as user types

As user types, I want thousands of separators to format a number. How would you do this with a polymer component? I have logic to change the string to, separated by thousands. I just want to know how to do this using a polymeric approach.

I have achieved something similar with angular using the ngmodel function. $ parse on their controller and directives

+3


source to share


1 answer


Use a data-bound tag.

<input type="text" value="{{someVar}}" />

      



if you have someVar

it defined in Script as @observable

, you can use your logic to add Separator.

-1


source







All Articles