Here I wanted to check sth whenever the currentFilter changed. This is how I could listen to the changes in the currentFilter. There other providers you can listen to. You can find a list in the image below the code.
var tasklistData = ($scope.tasklistData = $scope.tasklistData.newChild(
$scope
));
tasklistData.observe('currentFilter', function(currentFilter) {
//this method is called whenever the currentFilter changes.
//everytime the currentfilter changes we check whether the button should be
//showed or not
if (currentFilter && $scope.filterAuthorizations.includes(currentFilter.id))
{
$scope.buttonVisible = true;
} else {
$scope.buttonVisible = false;
}
});