앵귤러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>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 58 | jQuery Mobile | 8년 전 | 2978 | ||
| 57 | jQuery Mobile | 8년 전 | 2024 | ||
| 56 | jQuery Mobile | 8년 전 | 1353 | ||
| 55 | jQuery Mobile | 8년 전 | 1546 | ||
| 54 | jQuery Mobile | 8년 전 | 2230 | ||
| 53 | jQuery Mobile | 8년 전 | 1527 | ||
| 52 | jQuery Mobile | 8년 전 | 1551 | ||
| 51 | jQuery Mobile | 8년 전 | 1420 | ||
| 50 | jQuery Mobile | 8년 전 | 1309 | ||
| 49 | jQuery Mobile | 8년 전 | 1814 | ||
| 48 | jQuery Mobile | 8년 전 | 1458 | ||
| 47 | jQuery Mobile | 8년 전 | 2014 | ||
| 46 | jQuery Mobile | 8년 전 | 1975 | ||
| 45 | jQuery Mobile | 8년 전 | 1509 | ||
| 44 | jQuery Mobile | 8년 전 | 1670 | ||
| 43 | jQuery Mobile | 8년 전 | 1783 | ||
| 42 | jQuery Mobile | 8년 전 | 1660 | ||
| 41 | jQuery Mobile | 8년 전 | 1830 | ||
| 40 | jQuery Mobile | 8년 전 | 1468 | ||
| 39 | jQuery Mobile | 8년 전 | 1628 | ||
| 38 | jQuery Mobile | 8년 전 | 2175 | ||
| 37 | jQuery Mobile | 8년 전 | 2678 | ||
| 36 | jQuery Mobile | 8년 전 | 2126 | ||
| 35 | jQuery Mobile | 8년 전 | 1514 | ||
| 34 | jQuery Mobile | 8년 전 | 2414 | ||
| 33 | AngularJS | 8년 전 | 2860 | ||
| 32 | AngularJS | 8년 전 | 2426 | ||
| 31 | AngularJS | 8년 전 | 1761 | ||
| 30 | AngularJS | 8년 전 | 2836 | ||
| 29 | AngularJS | 8년 전 | 2389 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기