首页 > 代码库 > AngularJS 细节

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>

 

AngularJS 细节