Here's a simple logic: Display the link only when at least one checkbox is checked. This functionality is implemented within the calculate checkbox function.
JavaScript
$scope.calculateChecked = function() {
var count = 0;
angular.forEach($scope.data, function(value) {
if(value.checked)
count++;
});
if(count !=0){
return count;
}else{
return "null";
}
};
HTML
<a ng-show="{calculateChecked()}!='null'" ng-click="getlinks()"><p ng-show="loader==false" class="newtopic">Open {{calculateChecked()}} Topic</p></a>
The expectation was for
ng-show="{calculateChecked()}!='null'"
to work as intended, but unfortunately it does not.