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년 전 | 2721 | ||
| 207 | AngularJS | 8년 전 | 1462 | ||
| 206 | AngularJS | 8년 전 | 1112 | ||
| 205 | AngularJS | 8년 전 | 985 | ||
| 204 | AngularJS | 8년 전 | 1386 | ||
| 203 | AngularJS | 8년 전 | 1183 | ||
| 202 | AngularJS | 8년 전 | 1499 | ||
| 201 | AngularJS | 8년 전 | 1448 | ||
| 200 | AngularJS | 8년 전 | 1422 | ||
| 199 | AngularJS | 8년 전 | 1345 | ||
| 198 | AngularJS | 8년 전 | 1227 | ||
| 197 | AngularJS | 8년 전 | 1390 | ||
| 196 | AngularJS | 8년 전 | 1043 | ||
| 195 | AngularJS | 8년 전 | 1256 | ||
| 194 | AngularJS | 8년 전 | 1267 | ||
| 193 | AngularJS | 8년 전 | 1613 | ||
| 192 | AngularJS | 8년 전 | 1359 | ||
| 191 | AngularJS | 8년 전 | 1584 | ||
| 190 | AngularJS | 8년 전 | 1551 | ||
| 189 | AngularJS | 8년 전 | 1642 | ||
| 188 | AngularJS | 8년 전 | 1397 | ||
| 187 | AngularJS | 8년 전 | 1367 | ||
| 186 | AngularJS | 8년 전 | 1400 | ||
| 185 | AngularJS | 8년 전 | 1435 | ||
| 184 | AngularJS | 8년 전 | 1477 | ||
| 183 | AngularJS | 8년 전 | 1472 | ||
| 182 | AngularJS | 8년 전 | 1008 | ||
| 181 | AngularJS | 8년 전 | 1386 | ||
| 180 | AngularJS | 8년 전 | 1277 | ||
| 179 | AngularJS | 8년 전 | 1251 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기