how to get sum inside scope?

how to sum value inside Scope and store to another scope variable ?

$scope.cart = {
   { name: bag , price : 2000 },
   { name: shoes, price : 3000}
}

I want to store the total of sum into $scope.pay

how I can get there?

63 thoughts on “how to get sum inside scope?”

Leave a Comment