Codepedia
.info
Home
About
Demos
Tools
SVG Wave Generator
Colors
Edit This Code :
<html> <head><script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script><link rel='stylesheet' href='https://codepedia.info/wp-content/themes/themevicky/css/editor.css' type='text/css' /> </head> <body ng-app="myapp" ng-controller="tableController"> <table class="table table-stripe" > <thead><tr> <th>Sr no</th> <th>Name</th> <th>Gender</th> <th> City </th> </tr></thead> <tbody> <tr ng-repeat="emp in employees"> <td> {{$index + 1}}</td> <td> {{ emp.Name }} </td> <td> {{emp.Gender }} </td> <td> {{emp.City }}</td> </tr> </tbody> </table> <script type="text/javascript"> var app = angular.module("myapp", []); app.controller("tableController", ['$scope', function ($scope) { $scope.employees = [{ 'Name': 'Satinder Singh', 'Gender': 'Male', 'City': 'Bombay' }, { 'Name': 'Leslie Mac', 'Gender': 'Female', 'City': 'Queensland' }, { 'Name': 'Andrea ely ', 'Gender': 'Female', 'City': 'Rio' }, { 'Name': 'Amit Sarna', 'Gender': 'Male', 'City': 'Navi Mumbai' }, { 'Name': 'David Miller', 'Gender': 'Male', 'City': 'Scouthe'}]; } ]); </script> </body> </html>
➤ Run / View
Result :