0% found this document useful (0 votes)
6 views

11

The document displays student details in an AngularJS application using a table, it loops through an array of student objects to output each student's name and GPA.

Uploaded by

atriahostels
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

11

The document displays student details in an AngularJS application using a table, it loops through an array of student objects to output each student's name and GPA.

Uploaded by

atriahostels
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

<!

DOCTYPE html>
<html ng-app="myApp">
<head>
<title>Student Details</title>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.8.2/angular.min.js"></
script>
</head>
<body>
<div ng-controller="StudentController as ctrl">
<h2>Student Details</h2>
<table border="1">
<tr>
<th>Name</th>
<th>CGPA</th>
</tr>
<tr ng-repeat="student in ctrl.students">
<td>{{ student.name | uppercase }}</td>
<td>{{ student.cgpa | number:2 }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('StudentController', function () {
this.students = [
{ name: "Sharanya", cgpa: 3.8 },
{ name: "Virat", cgpa: 3.6 },
{ name: "Rohit", cgpa: 3.5 },
{ name: "Taylor", cgpa: 3.7 }
];
});
</script>
</body>
</html>

You might also like