$http({
url: Config.ApiURL + "/site/go",
method: "POST",
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
data: $.param(testimony)
}).progress(function (data, status, headers, config) { //Not sure about this line
console.log('progressing');
}).success(function (data, status, headers, config) {
console.log('success');
});
我想在它成功或錯誤之前顯示一些東西,所以我不知道.progress
部分,我只是插入它作爲一個例子,併爲您設想我的問題..是否有可能?有沒有一個內置的功能呢?Http進度函數?
順便說一句,即時通訊新角度。 TIA :)
你需要一個指令。已經有一個SO發佈:http://stackoverflow.com/questions/17144180/angularjs-loading-screen-on-ajax-request – devz