We have to use custom scope varibale within ng-repeat using angularjs, but it will return last value to all
{{discountvalue}}
$http.get('/api/Product/ListOnlyProductOrderFeatured/', { params: {} }).success(function (data) {
$scope.UserProduct = data;
for (var i = 0; i < $scope.UserProduct.length; i++) {
$scope.generalprice = $scope.UserProduct[i].ec_shop_product_price;
$scope.discountprice = $scope.UserProduct[i].ec_shop_product_discount;
$scope.discountvalue = $scope.generalprice - $scope.discountprice;
}
})
Please anyone explain how to do ASAP

Debasis SahaRank #21 · 46.5K reputationPosted Mar 15, 2018, 9:44 PM EDT
Debasis SahaRank #21 · 46.5K reputationPosted Mar 15, 2018, 9:27 PM EDT
Sudarvizhi J90 reputationPosted Mar 15, 2018, 9:31 PM EDT
Sudarvizhi J90 reputationPosted Mar 15, 2018, 11:46 PM EDT