앵귤러js orderBy 필터로 표시
앵귤러js orderBy 필터로 표시
표를 정렬하려면 orderBy 필터를 추가하십시오 .
예
<table>
<tr ng-repeat="x in names | orderBy : 'Country'">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
<!DOCTYPE html>
<html>
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names | orderBy : 'Country'">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
표를 정렬하려면 orderBy 필터를 추가하십시오 .
예
<table>
<tr ng-repeat="x in names | orderBy : 'Country'">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
<!DOCTYPE html>
<html>
<style>
table, th , td {
border: 1px solid grey;
border-collapse: collapse;
padding: 5px;
}
table tr:nth-child(odd) {
background-color: #f1f1f1;
}
table tr:nth-child(even) {
background-color: #ffffff;
}
</style>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names | orderBy : 'Country'">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 148 | AngularJS | 8년 전 | 1662 | ||
| 147 | AngularJS | 8년 전 | 1076 | ||
| 146 | AngularJS | 8년 전 | 1266 | ||
| 145 | AngularJS | 8년 전 | 1372 | ||
| 144 | AngularJS | 8년 전 | 1159 | ||
| 143 | AngularJS | 8년 전 | 1205 | ||
| 142 | AngularJS | 8년 전 | 1175 | ||
| 141 | AngularJS | 8년 전 | 1336 | ||
| 140 | AngularJS | 8년 전 | 1201 | ||
| 139 | AngularJS | 8년 전 | 1447 | ||
| 138 | AngularJS | 8년 전 | 1155 | ||
| 137 | AngularJS | 8년 전 | 1065 | ||
| 136 | AngularJS | 8년 전 | 1163 | ||
| 135 | AngularJS | 8년 전 | 1683 | ||
| 134 | AngularJS | 8년 전 | 1384 | ||
| 133 | AngularJS | 8년 전 | 1481 | ||
| 132 | AngularJS | 8년 전 | 1100 | ||
| 131 | AngularJS | 8년 전 | 1375 | ||
| 130 | AngularJS | 8년 전 | 1466 | ||
| 129 | AngularJS | 8년 전 | 1448 | ||
| 128 | AngularJS | 8년 전 | 2068 | ||
| 127 | AngularJS | 8년 전 | 1492 | ||
| 126 | jQuery Mobile | 8년 전 | 2263 | ||
| 125 | jQuery Mobile | 8년 전 | 2020 | ||
| 124 | jQuery Mobile | 8년 전 | 1887 | ||
| 123 | jQuery Mobile | 8년 전 | 1820 | ||
| 122 | jQuery Mobile | 8년 전 | 1862 | ||
| 121 | jQuery Mobile | 8년 전 | 2066 | ||
| 120 | jQuery Mobile | 8년 전 | 1601 | ||
| 119 | jQuery Mobile | 8년 전 | 1681 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기