<!DOCTYPE html>
<html>
<head>
<Meta charset="utf-8">
<Meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" href="">
</head>
<body>
<div ng-app="" ng-init="quantity=1;cost=5">
<p>总价:{{quantity + cost}}</p>
<p>总价:{{quantity - cost}}</p>
<p>总价:{{quantity * cost}}</p>
<p>总价:{{quantity / cost}}</p>
</div>
</body>
<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
</html>