//创建一个应用程序
var app=angular.module("myApp",[]);
//创建控制器
app.controller("myController",["$scope","$http",function($scope,$http){
$http.get("url").then(function successCallback(response){
},function errorCallback(response){
})
}])
//创建一个应用程序
var app=angular.module("myApp",[]);
//创建控制器
app.controller("myController",["$scope","$http",function($scope,$http){
$http.get("url").then(function successCallback(response){
},function errorCallback(response){
})
}])
本文标题:angularJS $http服务
本文链接:https://www.haomeiwen.com/subject/fpinuxtx.html
网友评论