TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sudarvizhi J
NA
101
24.1k
custom scope variable within ng-repeat using angularjs
Mar 16 2018 1:12 AM
We have to use custom scope varibale within ng-repeat using angularjs, but it will return last value to all
<div ng-repeat="pro in UserProduct">
{{discountvalue}}
</div>
<script>
$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;
}
})
</script>
Please anyone explain how to do ASAP
Reply
Answers (
4
)
Calling Aspx page with Barchart
retrieve image from database