title: How do I make AngularJS update input values?
body: <p>Trying to figure out why my last input won't update.</p>
  
  <p>Here's my <a href="https://jsfiddle.net/Lzcvukq8/" rel="nofollow noreferrer">JSFiddle</a> </p>
  
  <p><a href="https://jsfiddle.net/Lzcvukq8/" rel="nofollow noreferrer">https://jsfiddle.net/Lzcvukq8/</a></p>
  
  <p>I think there's something wrong with my JS</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function calculatorController($scope){
   // Sixteen oz
   $scope.costPerCanSixteen = function(){
    return $scope.priceSixteen/(24*$scope.casesSixteen);
   };
  };</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"&gt;&lt;/script&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;div id="sixteen-oz" ng-controller="calculatorController"&gt;
        &lt;div class='hr'&gt;&lt;/div&gt;
        &lt;h1&gt;One&lt;/h1&gt;
        &lt;form class="form-horizontal"&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="inputCases" class="col-sm-6 control-label"&gt;Amount of Cases&lt;/label&gt;
            &lt;div class="col-sm-offset-1 col-sm-5"&gt;
              &lt;input type="number" min="0.01" step="0.01" max="2500" class="form-control" ng-model="casesSixteen"/&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="inputCost" class="col-sm-6 control-label"&gt;Cost Per Case&lt;/label&gt;
            &lt;div class="col-sm-offset-1 col-sm-5"&gt;
              &lt;input type="number" min="0.01" step="0.01" max="2500" class="form-control" placeholder="29.40" ng-model="priceSixteen"/&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group"&gt;
            &lt;label for="canCost" class="col-sm-6 control-label"&gt;Cost Per Can&lt;/label&gt;
            &lt;div class="col-sm-offset-1 col-sm-5"&gt;
              &lt;input type="text" class="form-control answer-to-input" value="{{ costPerCanSixteen() }}"/&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/form&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>