AngularJS ng-options와 ng-repeat
AngularJS ng-options와 ng-repeat
이 ng-repeat지시문을 사용하여 동일한 드롭 다운 목록을 만들 수도 있습니다 .
예
<select>
<option ng-repeat="x in names">{{x}}</option>
</select>
<!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="myCtrl">
<select>
<option ng-repeat="x in names">{{x}}</option>
</select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = ["Emil", "Tobias", "Linus"];
});
</script>
<p>This example shows how to fill a dropdown list using the ng-repeat directive.</p>
</body>
</html>
이 ng-repeat지시문을 사용하여 동일한 드롭 다운 목록을 만들 수도 있습니다 .
예
<select>
<option ng-repeat="x in names">{{x}}</option>
</select>
<!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="myCtrl">
<select>
<option ng-repeat="x in names">{{x}}</option>
</select>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
$scope.names = ["Emil", "Tobias", "Linus"];
});
</script>
<p>This example shows how to fill a dropdown list using the ng-repeat directive.</p>
</body>
</html>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 178 | AngularJS | 8년 전 | 1436 | ||
| 177 | AngularJS | 8년 전 | 1209 | ||
| 176 | AngularJS | 8년 전 | 1280 | ||
| 175 | AngularJS | 8년 전 | 1373 | ||
| 174 | AngularJS | 8년 전 | 1146 | ||
| 173 | AngularJS | 8년 전 | 1889 | ||
| 172 | AngularJS | 8년 전 | 1441 | ||
| 171 | AngularJS | 8년 전 | 1132 | ||
| 170 | AngularJS | 8년 전 | 1398 | ||
| 169 | AngularJS | 8년 전 | 1191 | ||
| 168 | AngularJS | 8년 전 | 1009 | ||
| 167 | AngularJS | 8년 전 | 1973 | ||
| 166 | AngularJS | 8년 전 | 1045 | ||
| 165 | AngularJS | 8년 전 | 1113 | ||
| 164 | AngularJS | 8년 전 | 1321 | ||
| 163 | AngularJS | 8년 전 | 1160 | ||
| 162 | AngularJS | 8년 전 | 1376 | ||
| 161 | AngularJS | 8년 전 | 1381 | ||
| 160 | AngularJS | 8년 전 | 1137 | ||
| 159 | AngularJS | 8년 전 | 1098 | ||
| 158 | AngularJS | 8년 전 | 1519 | ||
| 157 | AngularJS | 8년 전 | 1485 | ||
| 156 | AngularJS | 8년 전 | 1334 | ||
| 155 | AngularJS | 8년 전 | 1220 | ||
| 154 | AngularJS | 8년 전 | 1629 | ||
| 153 | AngularJS | 8년 전 | 1114 | ||
| 152 | AngularJS | 8년 전 | 1533 | ||
| 151 | AngularJS | 8년 전 | 1433 | ||
| 150 | AngularJS | 8년 전 | 1129 | ||
| 149 | AngularJS | 8년 전 | 1652 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기