Ng-Repeat-9

 
Ng-Repeat-9
 
 
 
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"></script> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> </head> <body ng-app="app"> <div ng-controller="myController"> <div class="container"> <div class="row"> <div class="col-md-12"> <table class="table table-striped table-bordered table-hover"> <tr> <th>Name</th> <th>Age</th> </tr> <tr ng-repeat="emp in employees | limitTo:3"> <td>{{emp.name}}</td> <td>{{emp.age}}</td> </tr> </table> </div> </div> </div> </div> <script> var app = angular.module("app", []); app.controller('myController', ['$scope', function ($scope) { $scope.employees = [ { name: "John", age: "30" }, { name: "Smith", age: '28' }, { name: "Jennifer", age: '19' }, { name: "David", age: '20' }, { name: "Allen", age: '20' }, { name: "Marry", age: '20' }, ]; }]); </script> </body> </html>
Output