diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-21 12:49:26 +0100 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-11-21 12:57:03 +0100 |
commit | 6d3e829821707095269590f8a880f88d1cf8c980 (patch) | |
tree | 4f49c314b4602faed9909daf6e904da64cdd2479 /js/controller | |
parent | 1ef00530bd5eab6688b297197b775d3d6289fa6f (diff) |
hide categories without elements
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/ExploreController.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/js/controller/ExploreController.js b/js/controller/ExploreController.js index d7f869eaf..7fca456e5 100644 --- a/js/controller/ExploreController.js +++ b/js/controller/ExploreController.js @@ -20,4 +20,10 @@ app.controller('ExploreController', function (sites, $rootScope, FeedResource) { $rootScope.$broadcast('addFeed', url); }; + this.isCategoryShown = function (data) { + return data.filter(function (element) { + return FeedResource.get(element.url) === undefined; + }).length > 0; + }; + });
\ No newline at end of file |