title: how to access forEach in angularjs
body: <p>Brand new here sorry if I do something wrong. 
        Here is my js fiddle     <a href="https://jsfiddle.net/phorton/2rdyj9oe/2/" rel="nofollow">https://jsfiddle.net/phorton/2rdyj9oe/2/</a></p>
  
  <p>I am trying to convert this to angular. I am stuck on trying to capture each 
  numCoins value.</p>
  
  <pre><code>this.calcAmount = function(amount) {
      amount = amount * 100
      var coins = [
          {name: 'quarters', value: 25}, 
          {name: 'dimes', value: 10},
          {name: 'nickles', value: 5}, 
          {name: 'pennies', value: 1}]
  
      coins.forEach(function (coin) {
        var numCoins = Math.floor(amount / coin.value)
        this[coin.name] = numCoins
        amount -= (numCoins * coin.value)
  })
  </code></pre>
  
  <p>}
   The top part of my js fiddle works putting the values out in console.log.
  I need to store each iteration of numCoins and have it update each value on angluarjs. I am really lost sorry.</p>