我有这个控制器可以为 Angular UI typeahead 正常工作。如何将服务器调用添加为资源?
var receivableApp = angular.module('receivableApp', ['ui.bootstrap', 'ngResource'])
.controller('ReceivableController', function ($scope,$http) {
$scope.Debtors = function (term) {
return $http.get('/Receivable/GetDebtors/?term=' + term).then(function (response) {
return response.data;
});
};
});