如何在执行函数后重新加载http.get请求 [英] How to reload a http.get request after performing a function
本文介绍了如何在执行函数后重新加载http.get请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从列表中删除帖子。删除功能通过串行传递到下面显示的删除功能来执行。
I am trying to delete a post from a list. The delete function is performing by passing serially to a delete function showed below.
$scope.go = function(ref) {
$http.get("api/phone_recev.php?id="+ref)
.success(function (data) { });
}
执行该功能后,我需要重新加载使用过的http.get请求用于列出列表。
After performing the function, I need to reload the http.get request which used for listing the list.
$http.get("api/phone_accept.php")
.then(function (response) { });
执行此功能后。整个列表将使用新的更新列表重新加载。有没有办法做这件事。
Once the function performed. The entire list will reload with new updated list. Is there any way to do this thing.
推荐答案
试试这个
$scope.go = function(ref) {
$http.get("api/phone_recev.php?id="+ref)
.success(function (data) {
//on success of first function it will call
$http.get("api/phone_accept.php")
.then(function (response) {
});
});
}
这篇关于如何在执行函数后重新加载http.get请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文