title: Loan Calculator
body: <p>I'm new to Angular JS. I was trying to create a Loan Calculator with Angular JS and the prototype seems to work well.</p>
  
  <p>I want to ask all Angular's guru, if there is a better way (using the framework) to write only a formula for both interest rate. Actually I'm doing this thanks to a function as follow:</p>
  
  <pre><code>function totalCalc(years, amount) {
      calc = (((amount * 9.9 * years) /1200)/12) + (amount / (years*12));
      $scope.total = currencyRround(calc);
  
      calc2 = (((amount * 12.5 * years) /1200)/12) + (amount / (years*12));
      $scope.total2 = currencyRround(calc2);
  }
  </code></pre>
  
  <p>I was thinking to get this work with <strong>ng-repeat</strong>, defining interest's rates as follow:</p>
  
  <pre><code>$scope.interests= [
      {
          rate: '9.9'
      },{
          rate: '12.5'
      }
  ];
  </code></pre>
  
  <p>and then integrate the values in a forEach as follow:</p>
  
  <pre><code>angular.forEach($scope.interests, function(s){
      interest = s.rate;
  }
  </code></pre>
  
  <p>but I haven't enough experience to think further...
  Do you find this could be a good way to get things done?</p>
  
  <p>Here is the JSFiddle with the "Prototype":
  <a href="http://jsfiddle.net/645Xs/2/" rel="nofollow">http://jsfiddle.net/645Xs/2/</a></p>
  
  <p>Thank you for the help :)</p>