AngularJS 테이블

· 8년 전 · 1149
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>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

퍼블리싱강좌

+
분류 제목 글쓴이 날짜 조회
AngularJS 8년 전 조회 1,229
AngularJS 8년 전 조회 1,290
AngularJS 8년 전 조회 1,390
AngularJS 8년 전 조회 1,157
AngularJS 8년 전 조회 1,900
AngularJS 8년 전 조회 1,454
AngularJS 8년 전 조회 1,137
AngularJS 8년 전 조회 1,406
AngularJS 8년 전 조회 1,201
AngularJS 8년 전 조회 1,017
AngularJS 8년 전 조회 1,983
AngularJS 8년 전 조회 1,055
AngularJS 8년 전 조회 1,116
AngularJS 8년 전 조회 1,309
AngularJS 8년 전 조회 1,150
AngularJS 8년 전 조회 1,367
AngularJS 8년 전 조회 1,374
AngularJS 8년 전 조회 1,135
AngularJS 8년 전 조회 1,097
AngularJS 8년 전 조회 1,513
AngularJS 8년 전 조회 1,488
AngularJS 8년 전 조회 1,327
AngularJS 8년 전 조회 1,219
AngularJS 8년 전 조회 1,629
AngularJS 8년 전 조회 1,091
AngularJS 8년 전 조회 1,502
AngularJS 8년 전 조회 1,434
AngularJS 8년 전 조회 1,125
AngularJS 8년 전 조회 1,656
AngularJS 8년 전 조회 1,692
🐛 버그신고