title: angularjs ionic app add two numbers one from database and other from input
body: <p>I'm trying to add two numbers in my application. One number is from database and other I want to insert in the application. It is very simple but I'm new to angularjs. This is my code:</p>
  
  <p>Html :</p>
  
  <pre><code>&lt;div class="item-input-inset"&gt;
   &lt;label class="item-input-wrapper"&gt;
      &lt;input type="number" placeholder="Insert Points" ng-model="inp"/&gt;
     &lt;/label&gt;
     &lt;/div&gt;
     &lt;span&gt; {{sum()}} &lt;/span&gt;app.js
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>.controller('AppCtrl', function($scope, PointService) {
  $scope.points = 0;
  $scope.inp = 0;
  
  $scope.sum = function(){ 
  return $scope.points + $scope.inp }
  </code></pre>
  
  <p>All the app display is number 9 which is $scope.points as in my database it is 9 but it doesn't add the input number when I try to input any number. Anyone could please help?</p>