2017-10-20 13:30:01 -04:00
|
|
|
var angular = require('angular');
|
|
|
|
|
2017-10-11 20:26:07 -04:00
|
|
|
angular.module('PanelRoutes', ['ui.router']).config(['$stateProvider', '$urlRouterProvider', '$locationProvider', function($stateProvider, $urlRouterProvider, $locationProvider) {
|
|
|
|
$locationProvider.html5Mode(true);
|
|
|
|
|
|
|
|
$urlRouterProvider.otherwise('/panel');
|
|
|
|
|
|
|
|
$stateProvider
|
2017-10-14 17:06:43 -04:00
|
|
|
.state('dashboard', {
|
2017-10-11 20:26:07 -04:00
|
|
|
url: '/panel',
|
2017-10-20 16:46:14 -04:00
|
|
|
templateUrl: '/views/panel/dash.html'
|
2017-10-14 17:06:43 -04:00
|
|
|
}).state('search', {
|
|
|
|
url: '/panel/search',
|
2017-10-20 16:46:14 -04:00
|
|
|
templateUrl: '/views/panel/search.html'
|
2018-08-14 05:13:59 -04:00
|
|
|
}).state('keys', {
|
|
|
|
url: '/panel/keys',
|
|
|
|
templateUrl: '/views/panel/keys.html'
|
2017-10-14 17:06:43 -04:00
|
|
|
}).state('invites', {
|
|
|
|
url: '/panel/invites',
|
2017-10-20 16:46:14 -04:00
|
|
|
templateUrl: '/views/panel/invites.html'
|
2017-10-14 17:06:43 -04:00
|
|
|
}).state('stats', {
|
|
|
|
url: '/panel/stats',
|
2017-10-20 16:46:14 -04:00
|
|
|
templateUrl: '/views/panel/stats.html'
|
2017-10-14 17:06:43 -04:00
|
|
|
}).state('users', {
|
|
|
|
url: '/panel/users',
|
2017-10-20 16:46:14 -04:00
|
|
|
templateUrl: '/views/panel/users.html'
|
2017-10-14 17:06:43 -04:00
|
|
|
}).state('home', {
|
|
|
|
onEnter: ['$window', function($window) {
|
|
|
|
$window.location.href = '/home';
|
|
|
|
}]
|
2017-10-11 20:26:07 -04:00
|
|
|
});
|
|
|
|
}]);
|