I have an issue with a variable which is not being updated in the callback function of a promise as in the block of code below:
$scope.showSelected= function (node){
var promise = $http.get("http://127.0.0.1:5000/getResource?ldpr="+node.iri);
promise.then(function(result){
node = result.data;
});
};
$scope.showSelected
is a callback used by a widget. It has a parameter node
which I am trying to update within the callback of the promise. How can I update this variable within callback of the promise