앵귤러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>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 208 | 부트스트랩 | 8년 전 | 2736 | ||
| 207 | AngularJS | 8년 전 | 1480 | ||
| 206 | AngularJS | 8년 전 | 1129 | ||
| 205 | AngularJS | 8년 전 | 996 | ||
| 204 | AngularJS | 8년 전 | 1402 | ||
| 203 | AngularJS | 8년 전 | 1199 | ||
| 202 | AngularJS | 8년 전 | 1510 | ||
| 201 | AngularJS | 8년 전 | 1460 | ||
| 200 | AngularJS | 8년 전 | 1434 | ||
| 199 | AngularJS | 8년 전 | 1358 | ||
| 198 | AngularJS | 8년 전 | 1242 | ||
| 197 | AngularJS | 8년 전 | 1401 | ||
| 196 | AngularJS | 8년 전 | 1060 | ||
| 195 | AngularJS | 8년 전 | 1266 | ||
| 194 | AngularJS | 8년 전 | 1277 | ||
| 193 | AngularJS | 8년 전 | 1623 | ||
| 192 | AngularJS | 8년 전 | 1367 | ||
| 191 | AngularJS | 8년 전 | 1594 | ||
| 190 | AngularJS | 8년 전 | 1565 | ||
| 189 | AngularJS | 8년 전 | 1655 | ||
| 188 | AngularJS | 8년 전 | 1414 | ||
| 187 | AngularJS | 8년 전 | 1378 | ||
| 186 | AngularJS | 8년 전 | 1424 | ||
| 185 | AngularJS | 8년 전 | 1453 | ||
| 184 | AngularJS | 8년 전 | 1494 | ||
| 183 | AngularJS | 8년 전 | 1489 | ||
| 182 | AngularJS | 8년 전 | 1018 | ||
| 181 | AngularJS | 8년 전 | 1398 | ||
| 180 | AngularJS | 8년 전 | 1289 | ||
| 179 | AngularJS | 8년 전 | 1269 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기