앵귤러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>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 118 | jQuery Mobile | 8년 전 | 1352 | ||
| 117 | jQuery Mobile | 8년 전 | 1606 | ||
| 116 | jQuery Mobile | 8년 전 | 1835 | ||
| 115 | jQuery Mobile | 8년 전 | 1787 | ||
| 114 | jQuery Mobile | 8년 전 | 1977 | ||
| 113 | jQuery Mobile | 8년 전 | 1885 | ||
| 112 | jQuery Mobile | 8년 전 | 2492 | ||
| 111 | jQuery Mobile | 8년 전 | 1795 | ||
| 110 | jQuery Mobile | 8년 전 | 1589 | ||
| 109 | jQuery Mobile | 8년 전 | 1750 | ||
| 108 | jQuery Mobile | 8년 전 | 1975 | ||
| 107 | jQuery Mobile | 8년 전 | 1777 | ||
| 106 | jQuery Mobile | 8년 전 | 1456 | ||
| 105 | jQuery Mobile | 8년 전 | 1760 | ||
| 104 | jQuery Mobile | 8년 전 | 2441 | ||
| 103 | jQuery Mobile | 8년 전 | 1573 | ||
| 102 | jQuery Mobile | 8년 전 | 1514 | ||
| 101 | jQuery Mobile | 8년 전 | 1701 | ||
| 100 | jQuery Mobile | 8년 전 | 1935 | ||
| 99 | jQuery Mobile | 8년 전 | 1389 | ||
| 98 | jQuery Mobile | 8년 전 | 1411 | ||
| 97 | jQuery Mobile | 8년 전 | 1665 | ||
| 96 | jQuery Mobile | 8년 전 | 1316 | ||
| 95 | jQuery Mobile | 8년 전 | 1131 | ||
| 94 | jQuery Mobile | 8년 전 | 1534 | ||
| 93 | jQuery Mobile | 8년 전 | 1152 | ||
| 92 | jQuery Mobile | 8년 전 | 1574 | ||
| 91 | jQuery Mobile | 8년 전 | 1526 | ||
| 90 | jQuery Mobile | 8년 전 | 1692 | ||
| 89 | jQuery Mobile | 8년 전 | 1672 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기