-
Notifications
You must be signed in to change notification settings - Fork 0
/
student-details-all-filters.html
71 lines (71 loc) · 3 KB
/
student-details-all-filters.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<html>
<head>
<title>Student Details with all Filters</title>
</head>
<body ng-app="2712">
<h5>Student Details</h5>
<hr>
<div ng-controller="salman">
Name : <input ng-model="srch.sname">
Course : <select ng-model="srch.course">
<option>Mean</option>
<option>Angular</option>
<option>Css</option>
<option>Java</option>
<option>Html</option>
<option>Python</option>
<option>Javascript</option>
<option>UI</option>
<option value="">All Courses</option>
</select>
<br>
<br>
<input type="checkbox" ng-model="y"> Descending Order
<br><br>
<table border="2">
<tr>
<th><a href="#" ng-click="x='sid';y=!y;">Student ID</a></th>
<th>Student Name</th>
<th>Course</th>
</tr>
<tr ng-repeat="i in sal|filter:srch|orderBy:x:y">
<td>{{i.sid}}</td>
<td>{{i.sname}}</td>
<td>{{i.course}}</td>
</tr>
</table>
</div>
<script src="angular.js"></script>
<script>
var s = angular.module("2712",[]);
s.controller("salman",function($scope){
$scope.srch = {sname : " ",course:" "}
$scope.sal = [
{sid : 01,sname : "J",course : "Mean"},
{sid : 02,sname : "Ji",course : "UI"},
{sid : 03,sname : "Jig",course : "Angular 1"},
{sid : 04,sname : "Jign",course : "Angular 1.1"},
{sid : 05,sname : "Jigne",course : "Angular 1.2"},
{sid : 06,sname : "Jignes",course : "Angular 1.3"},
{sid : 07,sname : "Jignesh",course : "Angular 1.4"},
{sid : 11,sname : "S",course : "Angular 1.5"},
{sid : 12,sname : "Sa",course : "Angular 1.6"},
{sid : 13,sname : "Sau",course : "Angular 2"},
{sid : 14,sname : "Saur",course : "Angular 4"},
{sid : 15,sname : "Saura",course : "Angular 5"},
{sid : 16,sname : "Saurab",course : "Angular 6"},
{sid : 17,sname : "Saurabh",course : "HTML"},
{sid : 21,sname : "A",course : "CSS"},
{sid : 22,sname : "An",course : "Java"},
{sid : 23,sname : "Ank",course : "C"},
{sid : 24,sname : "Anku",course : "C++"},
{sid : 25,sname : "Ankur",course : "jQuery"},
{sid : 26,sname : "R",course : "JavaScript"},
{sid : 27,sname : "Ru",course : "Java"},
{sid : 37,sname : "Rut",course : "Mean"},
{sid : 47,sname : "Rutu",course : "Python"},
];
})
</script>
</body>
</html>