summaryrefslogtreecommitdiffstats
path: root/js/controller/ExploreController.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controller/ExploreController.js')
-rw-r--r--js/controller/ExploreController.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/controller/ExploreController.js b/js/controller/ExploreController.js
index 9de6035e7..7fca456e5 100644
--- a/js/controller/ExploreController.js
+++ b/js/controller/ExploreController.js
@@ -7,13 +7,23 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
-app.controller('ExploreController', function (sites, $rootScope) {
+app.controller('ExploreController', function (sites, $rootScope, FeedResource) {
'use strict';
this.sites = sites;
+ this.feedExists = function (url) {
+ return FeedResource.get(url) !== undefined;
+ };
+
this.subscribeTo = function (url) {
$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