Ng-repeat

Developer
Size
2,124 Kb
Views
12,144

How do I make an ng-repeat?

Basic to depth analysis about ng-repeat. What is a ng-repeat? How do you make a ng-repeat? This script and codes were developed by Yuvaraj Tana on 23 November 2022, Wednesday.

Ng-repeat Previews

Ng-repeat - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>ng-repeat</title> <link rel="stylesheet" href="css/style.css">
</head>
<body>
<div ng-app="app" ng-controller="sampleController"> <!-- Displaying array of values --> <div ng-repeat="num in numList">{{ num }}</div> <!-- Displaying array of object values --> <div ng-repeat="company in techCompanies"> <span>{{ company.name }}</span> <span>{{ company.ceo }}</span> <span>{{ company.hq }}</span> </div> <!-- Displaying array of object values with searching capability --> <input type="text" placeholder="search data" ng-model="searchData"/> <div ng-repeat="company in techCompanies | filter:searchData "> <span>{{ company.name }}</span> <span>{{ company.ceo }}</span> <span>{{ company.hq }}</span> </div> <!-- Displaying array of object values with searching capability and get filtered count --> <input type="text" placeholder="search data" ng-model="searchData1"/> <div> Filtered results count : {{ resultLength.length }}</div> <div ng-repeat="company in techCompanies | filter:searchData1 as resultLength"> <span>{{ company.name }}</span> <span>{{ company.ceo }}</span> <span>{{ company.hq }}</span> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.14/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Ng-repeat - Script Codes CSS Codes

div{ height:30px;
}
div span{ disaplay:inline-block; width:400px; padding:5px 10px;
}

Ng-repeat - Script Codes JS Codes

var app = angular.module('app',[]);
app.controller('sampleController',function($scope){ $scope.numList = [10,20,30,40,50]; $scope.techCompanies = [ {name:'Google',hq:'Mountain View',ceo:'Larry Page'}, {name:'Microsoft',hq:'Washignton DC',ceo:'Sathya Nadella'}, {name:'Infosys',hq:'Bangalore',ceo:'Narayana Murthy'}, {name:'Filpkart',hq:'Bangalore',ceo:'Sachin Bansal'} ];
});
Ng-repeat - Script Codes
Ng-repeat - Script Codes
Home Page Home
Developer Yuvaraj Tana
Username YuvarajTana
Uploaded November 23, 2022
Rating 3
Size 2,124 Kb
Views 12,144
Do you need developer help for Ng-repeat?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Yuvaraj Tana (YuvarajTana) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!