title: angular js adding two numbers issue
body: <p>I have this code using angular js:</p>
  
  <pre><code>&lt;!DOCTYPE html &gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Untitled Page&lt;/title&gt;
      &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          function TodoCtrl($scope) {
              $scope.total = function () {
                  return $scope.x + $scope.y;
              };
  
          }
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;div ng-app&gt;
    &lt;h2&gt;Calculate&lt;/h2&gt;
  
    &lt;div ng-controller="TodoCtrl"&gt;
      &lt;form&gt;
          &lt;li&gt;Number 1: &lt;input type="text" ng-model="x" /&gt; &lt;/li&gt;
          &lt;li&gt;Number 2: &lt;input type="text" ng-model="y" /&gt; &lt;/li&gt;
          &lt;li&gt;Total &lt;input type="text" value="{{total()}}"/&gt;&lt;/li&gt;       
      &lt;/form&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I am able to do multiplication, division and subtraction but for addition, the code just concatenates the x and y values (i.e. if x = 3 and y = 4, the total is 34 instead of being 7)</p>
  
  <p>What am I doing wrong?</p>