AngularJS Filters 필터 필터
AngularJS Filters 필터 필터
filter필터 어레이의 서브 세트를 선택한다.
filter필터는 어레이에 사용될 수 있고, 그것은 단지 일치를 포함하는 배열을 반환한다.
currency필터는 통화로 숫자를 포맷 :
예
문자 "i"가 포함 된 이름을 반환합니다.
<div ng-app="myApp" ng-controller="namesCtrl">
<ul>
<li ng-repeat="x in names | filter : 'i'">
{{ x }}
</li>
</ul>
</div>
[전체소스]
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="namesCtrl">
<ul>
<li ng-repeat="x in names | filter : 'i'">
{{ x }}
</li>
</ul>
</div>
<script>
angular.module('myApp', []).controller('namesCtrl', function($scope) {
$scope.names = [
'Jani',
'Carl',
'Margareth',
'Hege',
'Joe',
'Gustav',
'Birgit',
'Mary',
'Kai'
];
});
</script>
<p>This example displays only the names containing the letter "i".</p>
</body>
</html>
filter필터 어레이의 서브 세트를 선택한다.
filter필터는 어레이에 사용될 수 있고, 그것은 단지 일치를 포함하는 배열을 반환한다.
currency필터는 통화로 숫자를 포맷 :
예
문자 "i"가 포함 된 이름을 반환합니다.
<div ng-app="myApp" ng-controller="namesCtrl">
<ul>
<li ng-repeat="x in names | filter : 'i'">
{{ x }}
</li>
</ul>
</div>
[전체소스]
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="namesCtrl">
<ul>
<li ng-repeat="x in names | filter : 'i'">
{{ x }}
</li>
</ul>
</div>
<script>
angular.module('myApp', []).controller('namesCtrl', function($scope) {
$scope.names = [
'Jani',
'Carl',
'Margareth',
'Hege',
'Joe',
'Gustav',
'Birgit',
'Mary',
'Kai'
];
});
</script>
<p>This example displays only the names containing the letter "i".</p>
</body>
</html>
첨부파일
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 118 | jQuery Mobile | 8년 전 | 1336 | ||
| 117 | jQuery Mobile | 8년 전 | 1589 | ||
| 116 | jQuery Mobile | 8년 전 | 1815 | ||
| 115 | jQuery Mobile | 8년 전 | 1774 | ||
| 114 | jQuery Mobile | 8년 전 | 1959 | ||
| 113 | jQuery Mobile | 8년 전 | 1872 | ||
| 112 | jQuery Mobile | 8년 전 | 2482 | ||
| 111 | jQuery Mobile | 8년 전 | 1784 | ||
| 110 | jQuery Mobile | 8년 전 | 1576 | ||
| 109 | jQuery Mobile | 8년 전 | 1736 | ||
| 108 | jQuery Mobile | 8년 전 | 1963 | ||
| 107 | jQuery Mobile | 8년 전 | 1766 | ||
| 106 | jQuery Mobile | 8년 전 | 1445 | ||
| 105 | jQuery Mobile | 8년 전 | 1738 | ||
| 104 | jQuery Mobile | 8년 전 | 2406 | ||
| 103 | jQuery Mobile | 8년 전 | 1557 | ||
| 102 | jQuery Mobile | 8년 전 | 1498 | ||
| 101 | jQuery Mobile | 8년 전 | 1680 | ||
| 100 | jQuery Mobile | 8년 전 | 1914 | ||
| 99 | jQuery Mobile | 8년 전 | 1371 | ||
| 98 | jQuery Mobile | 8년 전 | 1391 | ||
| 97 | jQuery Mobile | 8년 전 | 1651 | ||
| 96 | jQuery Mobile | 8년 전 | 1306 | ||
| 95 | jQuery Mobile | 8년 전 | 1124 | ||
| 94 | jQuery Mobile | 8년 전 | 1521 | ||
| 93 | jQuery Mobile | 8년 전 | 1144 | ||
| 92 | jQuery Mobile | 8년 전 | 1563 | ||
| 91 | jQuery Mobile | 8년 전 | 1510 | ||
| 90 | jQuery Mobile | 8년 전 | 1677 | ||
| 89 | jQuery Mobile | 8년 전 | 1663 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기