案例:AngularJS案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<script src="/js/angular.js1.4.6/angular.min.js"></script> 
6
</head>
7
<body>
8
9
<div ng-app="" ng-init="quantity=1;cost=5">
10
<p>总价: <span ng-bind="quantity * cost"></span></p>
11
</div>
12
13
</body>
14
</html>
15

 运行结果 
 北美留学生论坛