I needed two more steps to make this work.
First, I use plain Javascript, not $http
, to poll the backend, while still letting Uri
compose the URI. That way, if a task no longer exists while polling, the UI does not produce any error notifications. Apparently $http
has some error handler attached to it which provides those notifications.
Second, one can send a refresh event to make the list of tasks update itself as soon as possible:
$scope.dismissTask = function() {
location.hash = $scope.stripParams({task: true, detailsTab: true});
$scope.$emit('refresh');
};