It appears as if AngularJS's angular.isNumber
is not working. It doesn't work with strings that are numbers. Am I doing something wrong? Should I just use isNaN()
?
angular.isNumber('95.55') == false
angular.isNumber('95.55' * 1) == true
angular.isNumber('bla' * 1) == true
angular.isNumber(NaN) == true
I need something to see if a string is a number (when it actually is) and angular.isNumber()
won't let me do that unless I multiply by 1, but if I do that then it will always be true. Also NaN
is not a number (by definition) and so should return false.