【发布时间】:2014-05-26 20:03:05
【问题描述】:
例如,我有这个电话:
$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,但我不想到处输入它,因为它将来会改变。
如何全局配置?
【问题讨论】: