我正在努力重複並希望獲得購物車中所有小計的總計。以ng重複獲得購物車總計
這裏是小提琴的鏈接。
我有想法通過這個
$scope.total = function() {
var total = 0;
angular.forEach($scope.items, function(item) {
})
return total;
}
,但它在我的情況越來越複雜
http://jsfiddle.net/75m7e/744/
不要忘記更換'{總}}'來'{{總()}}'。 – 2014-10-20 11:27:17