Answer the question
In order to leave comments, you need to log in
Where did I make a mistake in the code?
orderList stores data from localStorage.
Anything starting with $scope.totalPrice doesn't work.
diskShop.controller('diskBasketCtrl', function($scope) {
$scope.baskets = orderList;
$scope.totalPrice = function($scope) {
var total = 0;
angular.forEach($scope.baskets, function(baskets) {
total += baskets.Price;
});
return total;
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question