您的位置:首页 > 数据库

angular-数据库

2016-03-22 22:56 288 查看
<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("http://www.runoob.com/try/angularjs/data/Customers_MySQL.php")

.success(function (response) {$scope.names = response.records;});

});

</script>

[/code]

服务端代码

以下列出了列出了几种服务端代码类型:

使用 PHP 和 MySQL。返回 JSON。
使用 PHP 和 MS Access。返回 JSON。
使用 ASP.NET, VB, 及 MS Access。 返回 JSON。
使用 ASP.NET, Razor, 及 SQL Lite。 返回 JSON。

来自为知笔记(Wiz)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: