Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Few questions about directives
Message
 
 
À
25/02/2015 11:48:28
Information générale
Forum:
Javascript
Catégorie:
Autre
Divers
Thread ID:
01615790
Message ID:
01615825
Vues:
35
>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.

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
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform