I am working on a sample application from a book, AngularJS .
In the following code, {{funding.needed}} does not appear as 10 * startingEstimate . It is displayed literally, i.e. Does not appear as {{funding.needed}} on the page.
Why?
<html ng-app> <body ng-controller="TextController"> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.1/angular.min.js"> </script> <form ng-controller="StartUpController"> Starting: <input ng-change="computeNeeded()" ng-model="funding.startingEstimate"> Recommendation: {{funding.needed}} </form> <script> function StartUpController($scope) { $scope.funding = { startingEstimate: 0}; $scope.computeNeeded = function() { $scope.needed = $scope.startingEstimate * 10; }; } </script> </body> </html>
source share