title: Parsing integers in AngularJS
body: <p>I am using <a href="http://angularjs.org/" rel="nofollow">AngularJS</a> in one of our application.</p>
  
  <p>In the code below, while loading the page the expression addition (number, valuetoadd) parses correctly and give output as <code>1+1=2</code> but while changing the input it doesn't parse correctly and it gives output as `1+2=12'. </p>
  
  <p>Where do I need to change?</p>
  
  <pre><code>&lt;div ng-controller='MathsController'&gt;
      &lt;input type="range" min="0" max="100" step="1" value="1" ng-model='valuetoadd'/&gt;
  
      &lt;p&gt;Addition table of &lt;b&gt;{{valuetoadd}}&lt;/b&gt;&lt;/p&gt;
  
      &lt;div ng-repeat='number in numbers'&gt;
          {{number}} + {{valuetoadd}} = {{ addition(number,valuetoadd) }}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;script type="text/javascript"&gt;
      function MathsController($scope) 
      {
          $scope.valuetoadd= 1;
          $scope.numbers =[1,2,3,4,5,6,7,8,9,10]; 
          $scope.addition = function(number,valuetoadd)
          {
              return number+valuetoadd;
          }
      }
  &lt;/script&gt;
  </code></pre>