例如,我有这个电话:
$http({method: 'GET', url: '/someUrl'}).
success(function(data, status, headers, config) {
// this callback will be called asynchronously
// when the response is available
}).
error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
我需要它来请求http://my-api-url.com/someUrl,但我不想在任何地方都输入它,因为它将来会改变。
如何全局配置它?