I have following problem with ngShow. I receive response as a jSON from $http.get and construct several DOM elements using ngRepeat. All this working properly. From my controller a just apply:
$http.get(requestUrl).success(function (data) {
$scope.results = data.results;
});
data.results is a object like this:
{
"someProp": ["item1", "item2", "item3"],
"someProp1": ["item1", "item2", "item3"]
}
From my template I try to use ngShow like this:
<table ng-show="Object.keys(results).length > 0">
and like this:
<table ng-show="Object.keys($scope.results).length > 0">
With no luck.
<table ng-show="true">
and
<table ng-show="false">
working properly.
So it seems that the problem is in the expression. I would be very grateful for any help.