$scope.ajaxData = function () {
//需要向后台传递的数据
var postData = {
id: 1
}
$http({
method: 'GET',
url: 'http://127.0.0.1/company/getList',
params: postData //传递参数
}).then(function succ(response) {
//请求成功执行代码
$scope.loadState = false;
$scope.companyList = response.data.data; // 返回的数据源 绑定到select
}, function error(response) {
//请求失败执行代码
});
};