mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
- New nav menu active links work.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user