Background: app built in Angular (with routing), Node, Express, MongoDB/Mongoose.
In one controller I have an array of stuff $scope.array=[];
whose items are fetched through an $http
request.
I have a routine which modifies one item of the array:
$http.get('/api/update?id='+itemId, ..
Upon success of the get
request, I have to update the specific item of $scope.array
which has been modified. I know a possible way is to re-fetch the complete array, but seems inefficient.
Can anyone suggest a way to update/substitute only the item which has been modified?