<!doctype html> <html ng-app> <head> <script src="http://code.angularjs.org/angular-1.1.0.min.js"></script> <script src="script.js"></script> </head> <body> <div ng-controller="InvoiceCntl"> <b>Invoice:</b> <br> <br> <table> <tr><td>Quantity</td><td>Cost</td></tr> <tr> <td><input type="integer" min="0" ng-model="qty" required ></td> <td><input type="number" ng-model="cost" required ></td> </tr> </table> <hr> <b>Total:</b> {{qty * cost | currency}} </div> </body></html> script.js: function InvoiceCntl($scope) { $scope.qty = 1; $scope.cost = 19.95;} end-to-end