diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-31 01:34:08 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-05-31 01:34:08 +0200 |
commit | 0675405a8cb0a35797e4f0b96bd9072986bd1507 (patch) | |
tree | f8cd6825daa2cdd12d00be5ea3bcfe3b3c289225 /js/controller | |
parent | 82f0a877a001ead0bd0cdd76d96fe46a071535d8 (diff) |
show unreadcount in title
Diffstat (limited to 'js/controller')
-rw-r--r-- | js/controller/NavigationController.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/js/controller/NavigationController.js b/js/controller/NavigationController.js index 17ef923aa..d91f14d88 100644 --- a/js/controller/NavigationController.js +++ b/js/controller/NavigationController.js @@ -8,8 +8,8 @@ * @copyright Bernhard Posselt 2014 */ app.controller('NavigationController', -function ($route, FEED_TYPE, - FeedResource, FolderResource, ItemResource, SettingsResource) { +function ($route, FEED_TYPE, FeedResource, FolderResource, ItemResource, + SettingsResource) { 'use strict'; this.feedError = ''; @@ -88,20 +88,24 @@ function ($route, FEED_TYPE, }; this.isSubscriptionsActive = () => { - return $route.current.$$route.type === FEED_TYPE.SUBSCRIPTIONS; + return $route.current && + $route.current.$$route.type === FEED_TYPE.SUBSCRIPTIONS; }; this.isStarredActive = () => { - return $route.current.$$route.type === FEED_TYPE.STARRED; + return $route.current && + $route.current.$$route.type === FEED_TYPE.STARRED; }; this.isFolderActive = (folderId) => { - return $route.current.$$route.type === FEED_TYPE.FOLDER && + return $route.current && + $route.current.$$route.type === FEED_TYPE.FOLDER && $route.current.params.id === folderId; }; this.isFeedActive = (feedId) => { - return $route.current.$$route.type === FEED_TYPE.FEED && + return $route.current && + $route.current.$$route.type === FEED_TYPE.FEED && $route.current.params.id === feedId; }; |