0
我正在研究具有動態生成的綁定,其中綁定本身是事先評估/計算的。例如:{{}}中綁定或嵌套{{}}中的動態變量名稱
<span ng-repeat="extra2 in product.extra2">
<input type="checkbox" checkbox-group />
<label>{{extra2.extra_0}}</label> //this complete work
<label>{{extr_price}}</label> //this not work
</span>
它不起作用。
ngBind
或ngBindTemplate
沒有用。
控制器
$scope.extr_price = 'extra2.extra_0';