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>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 208 | 부트스트랩 | 8년 전 | 2732 | ||
| 207 | AngularJS | 8년 전 | 1473 | ||
| 206 | AngularJS | 8년 전 | 1120 | ||
| 205 | AngularJS | 8년 전 | 992 | ||
| 204 | AngularJS | 8년 전 | 1395 | ||
| 203 | AngularJS | 8년 전 | 1189 | ||
| 202 | AngularJS | 8년 전 | 1504 | ||
| 201 | AngularJS | 8년 전 | 1454 | ||
| 200 | AngularJS | 8년 전 | 1431 | ||
| 199 | AngularJS | 8년 전 | 1351 | ||
| 198 | AngularJS | 8년 전 | 1234 | ||
| 197 | AngularJS | 8년 전 | 1396 | ||
| 196 | AngularJS | 8년 전 | 1051 | ||
| 195 | AngularJS | 8년 전 | 1263 | ||
| 194 | AngularJS | 8년 전 | 1273 | ||
| 193 | AngularJS | 8년 전 | 1620 | ||
| 192 | AngularJS | 8년 전 | 1364 | ||
| 191 | AngularJS | 8년 전 | 1591 | ||
| 190 | AngularJS | 8년 전 | 1559 | ||
| 189 | AngularJS | 8년 전 | 1651 | ||
| 188 | AngularJS | 8년 전 | 1408 | ||
| 187 | AngularJS | 8년 전 | 1372 | ||
| 186 | AngularJS | 8년 전 | 1417 | ||
| 185 | AngularJS | 8년 전 | 1447 | ||
| 184 | AngularJS | 8년 전 | 1486 | ||
| 183 | AngularJS | 8년 전 | 1485 | ||
| 182 | AngularJS | 8년 전 | 1012 | ||
| 181 | AngularJS | 8년 전 | 1393 | ||
| 180 | AngularJS | 8년 전 | 1281 | ||
| 179 | AngularJS | 8년 전 | 1261 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기