Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Few questions about directives
Message
 
 
À
26/02/2015 05:36:40
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01615790
Message ID:
01615857
Vues:
30
>>>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 ?

Looks like a good one. I was thinking also of borrowing logic for validators from the input type="number" into our directive and this way we would not need anything extra.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform