Ng-repeat
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 - 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'} ];
});
Developer | Yuvaraj Tana |
Username | YuvarajTana |
Uploaded | November 23, 2022 |
Rating | 3 |
Size | 2,124 Kb |
Views | 12,144 |
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!
Name | Size |
Background Text Using CSS overlay Like Watermark | 1,613 Kb |
Example 1 - SVG - Circle | 1,248 Kb |
Todo APP | 2,286 Kb |
Compositing Components | 2,386 Kb |
CSS Menu | 1,594 Kb |
Grouping checkbox | 1,964 Kb |
Arrow using css | 1,588 Kb |
React - Hello world | 2,212 Kb |
A Pen by Yuvaraj Tana | 1,165 Kb |
Digital Clock using JavaScript | 1,828 Kb |
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!
Name | Username | Size |
Starfield using KineticJS | Asp | 3,512 Kb |
Front in Aracaju Logo Pure CSS | Shankarcabus | 2,581 Kb |
Delete Hover | Chungman93 | 2,557 Kb |
TigerWoods Freecodecamp Page | Baileytj | 2,869 Kb |
Blank Starter | Mhartington | 2,171 Kb |
Price Comparison Table | Orrinward | 3,459 Kb |
Simple search using AngularJS | Haykou | 1,802 Kb |
Multi column experiment. | Spylefkaditis | 2,805 Kb |
SCSS Simple Animated Drop-In | Danwarfel | 2,175 Kb |
Pure CSS Spinners | Jlong | 2,043 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!