1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00
OpenSTF/res/app/menu/menu-controller.js
Gunther Brunner 593e14a80a - New nav menu.
- Polishing device list.
2014-03-25 21:18:10 +09:00

16 lines
403 B
JavaScript

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;
}
}