Semaphore/public/js/routes/router.js
Matej Kramny 04d0d9e4f9 Users API, Users UI
- Improved login failing
2016-04-10 19:03:12 +01:00

33 lines
813 B
JavaScript

app.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $couchPotatoProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$urlRouterProvider.otherwise('/');
$stateProvider
.state('dashboard', {
url: '/',
pageTitle: 'Dashboard',
templateUrl: '/tpl/dashboard.html',
controller: 'DashboardCtrl',
resolve: {
$d: $couchPotatoProvider.resolveDependencies(['controllers/dashboard'])
}
})
.state('users', {
url: '/users',
pageTitle: 'Users',
templateUrl: "/tpl/users/list.html",
controller: 'UsersCtrl',
resolve: {
$d: $couchPotatoProvider.resolve(['controllers/users'])
}
});
});
app.run(function($rootScope, $state, $stateParams, $http) {
$rootScope.$state = $state;
$rootScope.$stateParams = $stateParams;
});