diff --git a/public/scripts/controllers/tags-controller.js b/public/scripts/controllers/tags-controller.js index 4379751..7f690e7 100644 --- a/public/scripts/controllers/tags-controller.js +++ b/public/scripts/controllers/tags-controller.js @@ -18,9 +18,8 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', 'bookmarkService', 'p }); $scope.getBookmarks = function(tagId, currentPage) { - console.log('tags getBookmarks', tagId); $scope.bookmarkClicked = true; - $scope.currentTagId = tagId; + $scope.currentTagId = tagId; $scope.tags.forEach(function(tag) { tag.bookmarkClicked = false; @@ -91,5 +90,10 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', 'bookmarkService', 'p bookmarkService.getTags(params) .then((data) => $scope.tags = data) .catch((err) => console.log('getTags err', err)); + + pubSubService.publish('Common.menuActive', { + login: true, + index: 1 + }); } }]); diff --git a/public/views/tags.html b/public/views/tags.html index 0e1b291..da04313 100644 --- a/public/views/tags.html +++ b/public/views/tags.html @@ -3,7 +3,7 @@
- {{ tag.name }} x {{ tag.cnt }} + {{ tag.name }} ({{ tag.cnt }})
diff --git a/routes/api.js b/routes/api.js index aac5b6a..aff76df 100644 --- a/routes/api.js +++ b/routes/api.js @@ -265,7 +265,7 @@ api.get('/bookmarksByTag', function(req, res) { }) sendData.totalItems = totalItems; sendData.bookmarks = data; - + res.json(sendData); }) .catch((err) => console.log('bookmarks table or card err', err))