Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Few questions about directives
Message
De
25/02/2015 12:01:01
 
 
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01615790
Message ID:
01615826
Vues:
34
>>Think you're right. One thing to check : Is currentSpecial.discFlat in your model a number. If it's a string I think it could cause the error - see:
>>https://docs.angularjs.org/api/ng/input/input%5Bnumber%5D
>>
>>>What is your angularjs version?
>
>discFlat originally comes as a number. However, if you look closer at the smNumberFormat directive you'll see that we're using $filter service and it returns a string.

Hmm. Could be wrong but it seems to me that if you are using 'type="number"' then angular won't allow commas anyway so that filter is redundant ?

>So, in my opinion, if I can get the inputNumber directive apply first and then smNumberFormat, it would solve the problem. I was thinking that adding negative priority should solve the problem, but it didn't.
>
>So, after the number goes through the smNumberFormat directive, it comes as a string to the inputNumber check in the new angularjs and this is where it gives the error.
>
>I am wondering why do we need to check for the actual number and not the string number here? That's why I think it's an issue and I posted it here
>
>https://github.com/angular/angular.js/issues/11157
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform