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>
게시판 목록
퍼블리싱강좌
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 88 | jQuery Mobile | 8년 전 | 1923 | ||
| 87 | jQuery Mobile | 8년 전 | 1910 | ||
| 86 | jQuery Mobile | 8년 전 | 1515 | ||
| 85 | jQuery Mobile | 8년 전 | 1825 | ||
| 84 | jQuery Mobile | 8년 전 | 1862 | ||
| 83 | jQuery Mobile | 8년 전 | 1872 | ||
| 82 | jQuery Mobile | 8년 전 | 1647 | ||
| 81 | jQuery Mobile | 8년 전 | 1366 | ||
| 80 | jQuery Mobile | 8년 전 | 1802 | ||
| 79 | jQuery Mobile | 8년 전 | 1355 | ||
| 78 | jQuery Mobile | 8년 전 | 1748 | ||
| 77 | jQuery Mobile | 8년 전 | 1775 | ||
| 76 | jQuery Mobile | 8년 전 | 1781 | ||
| 75 | jQuery Mobile | 8년 전 | 1398 | ||
| 74 | jQuery Mobile | 8년 전 | 1533 | ||
| 73 | jQuery Mobile | 8년 전 | 1243 | ||
| 72 | jQuery Mobile | 8년 전 | 1625 | ||
| 71 | jQuery Mobile | 8년 전 | 1616 | ||
| 70 | jQuery Mobile | 8년 전 | 1500 | ||
| 69 | jQuery Mobile | 8년 전 | 1506 | ||
| 68 | jQuery Mobile | 8년 전 | 2036 | ||
| 67 | jQuery Mobile | 8년 전 | 1312 | ||
| 66 | jQuery Mobile | 8년 전 | 1689 | ||
| 65 | jQuery Mobile | 8년 전 | 1180 | ||
| 64 | jQuery Mobile | 8년 전 | 1463 | ||
| 63 | jQuery Mobile | 8년 전 | 1649 | ||
| 62 | jQuery Mobile | 8년 전 | 1626 | ||
| 61 | jQuery Mobile | 8년 전 | 1871 | ||
| 60 | jQuery Mobile | 8년 전 | 1401 | ||
| 59 | jQuery Mobile | 8년 전 | 1958 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기