How can angularjs check if ng-model is string or number value?
I have a java script in angular, if the textbox value is undefined or empty, this is fine and it works,
$scope.checkNumber = function(user_answer){
if(user_answer == undefined){
return false;
}
}
But my next question is how to make a function check if the value is a string or a number and returns a boolean. I don't know the correct syntax for the angular java script, can anyone help me solve my problem?
+3
source to share
2 answers