AngularJS 테이블
AngularJS 테이블
ng-repeat 지시어는 테이블을 표시하는 데 적합합니다.
테이블에 데이터 표시
각도가있는 표를 표시하는 것은 매우 간단합니다.
예
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
[전체소스]
<!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="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
</body>
</html>
ng-repeat 지시어는 테이블을 표시하는 데 적합합니다.
테이블에 데이터 표시
각도가있는 표를 표시하는 것은 매우 간단합니다.
예
<div ng-app="myApp" ng-controller="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
[전체소스]
<!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="customersCtrl">
<table>
<tr ng-repeat="x in names">
<td>{{ x.Name }}</td>
<td>{{ x.Country }}</td>
</tr>
</table>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("customers.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
</body>
</html>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 178 | AngularJS | 8년 전 | 1417 | ||
| 177 | AngularJS | 8년 전 | 1191 | ||
| 176 | AngularJS | 8년 전 | 1269 | ||
| 175 | AngularJS | 8년 전 | 1362 | ||
| 174 | AngularJS | 8년 전 | 1132 | ||
| 173 | AngularJS | 8년 전 | 1872 | ||
| 172 | AngularJS | 8년 전 | 1425 | ||
| 171 | AngularJS | 8년 전 | 1121 | ||
| 170 | AngularJS | 8년 전 | 1387 | ||
| 169 | AngularJS | 8년 전 | 1185 | ||
| 168 | AngularJS | 8년 전 | 998 | ||
| 167 | AngularJS | 8년 전 | 1960 | ||
| 166 | AngularJS | 8년 전 | 1033 | ||
| 165 | AngularJS | 8년 전 | 1095 | ||
| 164 | AngularJS | 8년 전 | 1296 | ||
| 163 | AngularJS | 8년 전 | 1140 | ||
| 162 | AngularJS | 8년 전 | 1357 | ||
| 161 | AngularJS | 8년 전 | 1366 | ||
| 160 | AngularJS | 8년 전 | 1119 | ||
| 159 | AngularJS | 8년 전 | 1082 | ||
| 158 | AngularJS | 8년 전 | 1494 | ||
| 157 | AngularJS | 8년 전 | 1465 | ||
| 156 | AngularJS | 8년 전 | 1314 | ||
| 155 | AngularJS | 8년 전 | 1207 | ||
| 154 | AngularJS | 8년 전 | 1605 | ||
| 153 | AngularJS | 8년 전 | 1066 | ||
| 152 | AngularJS | 8년 전 | 1473 | ||
| 151 | AngularJS | 8년 전 | 1405 | ||
| 150 | AngularJS | 8년 전 | 1102 | ||
| 149 | AngularJS | 8년 전 | 1633 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기