i have two pages in my app, one who displays a list of things and the second which displays a single item from that list. I have build a function which updates the status by calling server side api and then returns the modfied item How can i now get my view to be updated with the new item? I now would like to update the status from my list as well on the item detail page? Obvi
I call the function this way:
... href="#" ng-click="change_status(i.item_id,2)">In Text</div>
in my controller:
$scope.change_status = function (id, sts) {
MySrv.changeStatus(
{ item_id: id, item_sts: sts, user_id: window.UD.user_id
})
.then(function (response) {
//I am getting back my object here ->How can i now
//update the view for this specific object?
});
}