Home > DeveloperSection > Forums > How to use Ng-repeat inside ng-repeat in Angularjs
Ankit Singh

Total Post:341

Posted on    February-25-2016 9:49 PM

 Angular JS JQuery  HTML  Angular JS 

 1 Reply(s)
 662  View(s)
Rate this:
We want to use ng-repeat inside ng-repeat in Angularjs.how will do this please tell  me.

aditya kumar Patel

Total Post:254

Posted on    February-25-2016 9:59 PM


Layout = null;


<!DOCTYPE html>




<meta name="viewport" content="width=device-width" />

<script src="~/Scripts/jquery-1.9.1.js"></script>

<script src="~/Scripts/angular.js"></script>


var app = angular.module("myApp", []);

app.controller('MyCtrl', function ($scope) {

$scope.menuItems = [{ Productname: 'Samsung Galaxy S6 Compare', category: 'SAMSUNG' },

{ Productname: 'Samsung Galaxy S6 Edge', category: 'SAMSUNG' },

{ Productname: 'Compare Samsung Galaxy Core ', category: 'SAMSUNG' },

{ Productname: 'Lenovo Vibe Shot', category: 'Lenovo' },

{ Productname: 'Lenovo A6000', category: 'Lenovo' },

{ Productname: 'Lenovo K3 Note', category: 'Lenovo' }


$scope.categories = ['Lenovo', 'SAMSUNG']




<body ng-app="myApp" ng-controller="MyCtrl">


<ul ng-repeat="ca in categories">

<li style="font-weight:bold;">{{ca}}</li>

<li ng-repeat="menuItem in menuItems | filter:{category: ca}">{{menuItem.Productname}}</li>





Don't want to miss updates? Please click the below button!

Follow MindStick