工厂
app.factory('GISService', ['$resource', 'GISServiceURL', '$http', function($resource, GISServiceURL, $http) {
return function(term) {
return $resource(GISServiceURL + term, {}, {
'GetAllAddresses': {
method: 'GET',
crossDomain: true,
} // returns all matching addresses
});
};
}]);