title: Error: [ngModel:numfmt] Expected `1` to be a number angularjs
body: <p>I'm beginner in Angular.js.</p>
  
  <p>I'm trying to generate a dynamic form on <code>angular.js</code> app by fetching data from <code>mongodb</code>. I've stored imported data on mongodb through excel sheet so that's why all the <code>JSON</code> values are getting stored in <code>String</code> format.</p>
  
  <p>To tackle that issue I'm generating form dynamically by checking value of JSON object.</p>
  
  <p>Ex: If value contains number ("123456") then I'll display <code>input type="number"</code>, if value contains email then <code>input type="email"</code>, value contains dob then <code>datepicker</code> and so on..</p>
  
  <p>Following is my template code:</p>
  
  <pre><code>&lt;div class="form-group" ng-repeat="(key,value) in providerList"  ng-if="!$first"&gt;                    
     &lt;label&gt;{{key.replace("_", " ") | uppercase}}&lt;/label&gt;
     &lt;div ng-if="providerList[key].length &gt; 100"&gt;
     &lt;textarea class="form-control" ng-model="providerList[key]"&gt;&lt;/textarea&gt;
     &lt;/div&gt;
     &lt;div ng-if="providerList[key].length &lt; 100 &amp;&amp; !isNumeric(providerList[key]) &amp;&amp; !checkEmail(providerList[key])"&gt;
     &lt;input type="text" class="form-control" id='datepicker' ng-model="providerList[key]"&gt;        
     &lt;/div&gt;
  
     &lt;div ng-if="isNumeric(providerList[key])"&gt;                        
     &lt;input type="number" class="form-control" ng-model="providerList[key]"&gt;        
     &lt;/div&gt;
  
     &lt;div ng-if="checkEmail(providerList[key])"&gt;                        
     &lt;input type="email" class="form-control" ng-model="providerList[key]"&gt;        
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's my controller:</p>
  
  <pre><code>    $scope.isNumeric = function (data) {
  
                  if (isNaN(data)) {
                      return false;
                  } else {
                      return true;
                  }
  
  //                if (/^\d+$/.test(data)) {
  //                    return true;
  //                } else {
  //                    return false;
  //                }
              };
  
              $scope.checkEmail = function (email) {
                  var re = /^(([^&lt;&gt;()\[\]\\.,;:\s@"]+(\.[^&lt;&gt;()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
                  return re.test(email);
              };
  </code></pre>
  
  <p>Here whenever <code>isNumeric</code> function getting called its showing following error on console:</p>
  
  <pre><code>Error: [ngModel:numfmt] Expected `1` to be a number
  http://errors.angularjs.org/1.4.8/ngModel/numfmt?p0=1
  minErr/&lt;@http://localhost:1000/js/vendor/angular/angular.js:68:12
  numberInputType/&lt;@http://localhost:1000/js/vendor/angular/angular.js:21977:1
  ngModelWatch@http://localhost:1000/js/vendor/angular/angular.js:25489:21
  $RootScopeProvider/this.$get&lt;/Scope.prototype.$digest@http://localhost:1000/js/vendor/angular/angular.js:15888:34
  $RootScopeProvider/this.$get&lt;/Scope.prototype.$apply@http://localhost:1000/js/vendor/angular/angular.js:16160:13
  done@http://localhost:1000/js/vendor/angular/angular.js:10589:36
  completeRequest@http://localhost:1000/js/vendor/angular/angular.js:10787:7
  requestLoaded@http://localhost:1000/js/vendor/angular/angular.js:10728:1
  
  
  return logFn.apply(console, args);
  
  angular.js (line 12520)
  Error: [ngModel:numfmt] Expected `1234567890` to be a number
  http://errors.angularjs.org/1.4.8/ngModel/numfmt?p0=1234567890
  minErr/&lt;@http://localhost:1000/js/vendor/angular/angular.js:68:12
  numberInputType/&lt;@http://localhost:1000/js/vendor/angular/angular.js:21977:1
  ngModelWatch@http://localhost:1000/js/vendor/angular/angular.js:25489:21
  $RootScopeProvider/this.$get&lt;/Scope.prototype.$digest@http://localhost:1000/js/vendor/angular/angular.js:15888:34
  $RootScopeProvider/this.$get&lt;/Scope.prototype.$apply@http://localhost:1000/js/vendor/angular/angular.js:16160:13
  done@http://localhost:1000/js/vendor/angular/angular.js:10589:36
  completeRequest@http://localhost:1000/js/vendor/angular/angular.js:10787:7
  </code></pre>
  
  <p>Same way I'm calling function for email checking <code>checkEmail</code> and its working perfectly fine so what's the issue with <code>isNumeric</code> function.</p>