1 |
34144
|
sandro.lab
|
var module = angular.module('indexInspector', ['ngGrid', 'ngRoute', 'mdstoreInspectorControllers']);
|
2 |
|
|
|
3 |
|
|
module.config([
|
4 |
|
|
'$routeProvider',
|
5 |
|
|
function($routeProvider) {
|
6 |
|
|
$routeProvider
|
7 |
|
|
.when('/list', { templateUrl: '../resources/html/mdstore/list.html', controller: 'mdstoresController' })
|
8 |
|
|
.when('/inspect.do/:id', { templateUrl: '../resources/html/mdstore/inspect.html', controller: 'inspectMdstoresController' })
|
9 |
|
|
.otherwise({ redirectTo: '/list' });
|
10 |
|
|
}
|
11 |
|
|
]);
|
12 |
|
|
|
13 |
|
|
|
14 |
|
|
module.controller('moduleMenuCtrl', [ '$scope', '$location',
|
15 |
|
|
function ($scope, $location) {
|
16 |
|
|
$scope.isActive = function(regex) {
|
17 |
|
|
var re = new RegExp(regex);
|
18 |
|
|
return re.test($location.path());
|
19 |
|
|
}
|
20 |
|
|
}
|
21 |
|
|
]);
|
22 |
|
|
|
23 |
|
|
module.filter('encodeURIComponent', function() {
|
24 |
|
|
return window.encodeURIComponent;
|
25 |
|
|
});
|