GRESPL Nagpur
GRESPL Nagpur

Reputation: 2098

angular.isNumeric is not a function

I just added below code in angularjs controller to test number value,

$scope.isNumeric = angular.isNumeric;

And I am getting this error

TypeError: angular.isNumeric is not a function

I am trying to check number type like this.

<div ng-if="isNumeric(10)">
   This is numeric
</div>

Jsfiddle : https://jsfiddle.net/49k9cLz1/2/

Upvotes: 0

Views: 1158

Answers (1)

kamil-mrzyglod
kamil-mrzyglod

Reputation: 5008

You have made a mistake:

$scope.isNumeric = angular.isNumber;

Reference: isNumber

Upvotes: 2

Related Questions