Getting the values in response as:
[{
"Pf": "something1",
"label": ""
}, {
"Pf": "something1",
"label": ""
}]
JS
$scope.display = false;
$scope.getPanel = $http({
mode: 'cors',
method: 'GET',
url: '/url/',
headers: {
'Content-Type': 'application/json'
}
}).success(function(response) {
$scope.original = function() {
angular.forEach(response, function(value, key) {
if (value == "something1") {
dispaly = false;
} else if (value == "something2") {
display = false;
} else {
display = true;
}
});
return display;
};
});
HTML
<td>
<img src="image.png" uib-tooltip="{{status}}" ng-show="original()"/>
</td>
not getting key and value from response
dispaly = false;