Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Few questions about directives
Message
From
26/02/2015 05:36:40
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01615790
Message ID:
01615854
Views:
31
>>But you really want your formatter to run *after* the angular formatter (so it can strip the commas that are present) and, since it will get it's value as a string it would need to be rewritten accordingly.
>>
>>UPDATE: I see it is expecting a string so forget the last bit.
>>
>>What I'm not sure about is how you ensure your formatter is second in the chain.....
>>
>>UPDATE2 : Duh. I now see that's what you were trying with negative priority. Did you check the actual order obtained in that case ?
>
>I am not exactly sure how to test. I could not find priority property anywhere.
>
>When I was debugging, I think I saw the formatter running first and then the InputNumber code, but I am getting confused.

Came across this on github : http://blog.yodersolutions.com/validate-and-format-numbers-in-angularjs/
It's a replacement for 'type="number"' and seems to have all (and more) of the added functionality that you have in your directive ?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform