<html>
<body>
<div ng-app="" ng-controller="costController">
数量: <input type="number" ng-model="quantity">
价格: <input type="number" ng-model="price">
<p>总价 = {{ (quantity * price) | currency }}</p>
</div>
<script>
function costController($scope) {
$scope.quantity = 1;
$scope.price = 9.99;
}
</script>
<script src="https://libs.baidu.com/angular.js/1.2.5/angular.min.js"></script>
</body>
</html>