From 905d5477018e58d7adbbc98dfc606fd5bb1b4031 Mon Sep 17 00:00:00 2001 From: Martins Untals Date: Thu, 22 Aug 2013 22:31:10 +0300 Subject: [PATCH] added isSelected function for nav selection --- public/js/controllers/header.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/controllers/header.js b/public/js/controllers/header.js index c26d48f6..19df8c6f 100644 --- a/public/js/controllers/header.js +++ b/public/js/controllers/header.js @@ -11,4 +11,10 @@ function HeaderController($scope, $location, Global) { $scope.init = function() { }; + + $scope.isSelected = function(item) { + if ($location.path() == "/"+item.link) { + return "active" + } else return "" + } } \ No newline at end of file