Semaphore/public/js/routes/routes.js
2014-09-11 18:42:13 +01:00

36 lines
805 B
JavaScript

define([
'app',
'socketio',
'services/user',
'routes/playbooks',
'routes/identities',
'services/playbooks'
], function(app, io) {
app.config(function($stateProvider, $urlRouterProvider, $locationProvider, $couchPotatoProvider) {
$locationProvider.html5Mode(true);
$urlRouterProvider.otherwise('');
$stateProvider
.state('homepage', {
url: '/',
pageTitle: 'Homepage',
templateUrl: "/view/homepage"
})
.state('logout', {
url: '/logout',
pageTitle: 'Log Out',
controller: function($scope) {
window.location = "/logout";
}
})
})
.run(function($rootScope, $state, $stateParams, $http, user, playbooks) {
$rootScope.$state = $state
$rootScope.$stateParams = $stateParams
user.getUser(function() {});
playbooks.getPlaybooks(function() {});
})
})