使用格式:
// 简单的 GET 请求,可以改为 POST
$http({
method: 'GET',
url: '/someUrl'
}).then(function successCallback...www.runoob.com",
"Country": "CN"
},
{
"Name": "Google",
"Url...www.facebook.com",
"Country": "USA"
},
{
"Name": "微博",
"Url...$http.get(url) 是用于读取服务器数据的函数。
废弃声明 (v1.5)
v1.5 中$http 的 success 和 error 方法已废弃。使用 then 方法替代。...app.controller('siteCtrl', function($scope, $http) {
$http({
method: 'GET',
url