- New nav menu active links work.

This commit is contained in:
Gunther Brunner
2014-03-25 22:17:40 +09:00
parent 593e14a80a
commit 533ce2d967
4 changed files with 27 additions and 26 deletions

View File

@@ -1,16 +1,3 @@
module.exports = function MenuCtrl($scope) {
$scope.isActive = function (viewLocation) {
var pattern = '/' + viewLocation,
re = new RegExp(pattern);
return re.test($location.path());
};
$scope.isActive = function (path) {
console.log($location.path())
console.log($location.path().substr(0, path.length))
return $location.path().substr(0, path.length) == path;
}
}