AngularJS 细节

AngularJS 表达式({{ expression }})类似于 AngularJS ng-bind
例子:

<span>表达式</span>
<div ng-app="" ng-init="quantity=1;cost=5">
 
<p>总价: {{ quantity * cost }}</p>
 
</div>
<span>ng-bind:</span>
<div ng-app="" ng-init="quantity=1;cost=5">
 
<p>总价: <span ng-bind="quantity * cost"></span></p>
 
</div>

 

posted @ 2017-01-04 09:30  iZKang  阅读(113)  评论(0)    收藏  举报