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
23.9k
Asp.net MVC with angularjs - nested repeater
Nov 8 2017 4:27 AM
we have to implement nested ng-repeat in asp.net mvc with angularjs below code we have used its not working.
we want grouping content category based product listing. please anyone help ASAP. Below code we have used
Expected output:
Category1
Product1 catg1
Product2 catg1
Category2
Product1 catg2
Product2 catg2
index.cshtml file:
<div data-ng-repeat="catg in Categorys">
{{catg.ecom_category_title}}
<ul data-ng-repeat="prd in Products">
<li>{{prd.ecom_product_title}}</li>
</ul>
</div>
category.js file:
$http.get('/api/Category/ListAllCategory', { params: {} }).success(function (data) {
$scope.Categorys = data;
for (var i = 0; i < $scope.Categorys.length; i++) {
$scope.getCategoryID = $scope.Categorys[i].ecom_category_id;
$http.get('/api/Product/ListAllProductByCategory', { params: { ecom_category_id: $scope.getCategoryID } }).success(function (response) {
alert('dsfsdf');
$scope.Products = response;
})
.error(function () {
$scope.error = "Some Error.";
});
}
})
.error(function () {
$scope.error = "Some Error.";
});
Reply
Answers (
2
)
why chapter meet is not conducted in KOLKATA
Extraction data from a Array to another wit filter