×
Display Code Example
Code Example
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<script>
var app = angular.module("myapp", []);
app.controller("myctrl", function($scope) {
$scope.s = [
{ rollno: "1", name: "syed", dept: "it", address: "hyd" },
{ rollno: "2", name: "mohd", dept: "cse", address: "chennai" },
{ rollno: "3", name: "uddin", dept: "mech", address: "bangalore" },
{ rollno: "4", name: "ahmed", dept: "ece", address: "mumbai" },
{ rollno: "5", name: "ali", dept: "civil", address: "delhi" }
];
});
</script>
</head>
<body ng-app="myapp">
<div ng-controller="myctrl">
<table border="4">
<tr>
<th>Roll No</th>
<th>Name</th>
<th>Department</th>
<th>Address</th>
</tr>
<tr ng-repeat="student in s">
<td>{{student.rollno}}</td>
<td>{{student.name}}</td>
<td>{{student.dept}}</td>
<td>{{student.address}}</td>
</tr>
</table>
</div>
</body>
</html>
rollno |
name |
dept |
address |
{{student.rollno}} |
{{student.name}} |
{{student.dept}} |
{{student.address}} |