AngularJS SQL - MySQL을 실행하는 PHP 서버에서 데이터 가져 오기
AngularJS SQL - MySQL을 실행하는 PHP 서버에서 데이터 가져 오기
<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_mysql.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
<!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">
<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_mysql.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
</body>
</html>
<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_mysql.php")
.then(function (response) {$scope.names = response.data.records;});
});
</script>
<!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">
<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_mysql.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년 전 | 1873 | ||
| 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년 전 | 1208 | ||
| 154 | AngularJS | 8년 전 | 1605 | ||
| 153 | AngularJS | 8년 전 | 1066 | ||
| 152 | AngularJS | 8년 전 | 1473 | ||
| 151 | AngularJS | 8년 전 | 1405 | ||
| 150 | AngularJS | 8년 전 | 1102 | ||
| 149 | AngularJS | 8년 전 | 1633 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기