2014-08-24 19:36:34 +02:00
|
|
|
define([
|
|
|
|
'app',
|
2014-08-24 23:00:05 +02:00
|
|
|
'services/user',
|
2014-08-25 12:35:49 +02:00
|
|
|
'routes/playbooks',
|
|
|
|
'routes/credentials',
|
|
|
|
'services/playbooks'
|
2014-08-24 19:36:34 +02:00
|
|
|
], function(app) {
|
|
|
|
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";
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
2014-08-25 12:35:49 +02:00
|
|
|
.run(function($rootScope, $state, $stateParams, $http, user, playbooks) {
|
2014-08-24 19:36:34 +02:00
|
|
|
$rootScope.$state = $state
|
|
|
|
$rootScope.$stateParams = $stateParams
|
|
|
|
|
2014-08-25 12:35:49 +02:00
|
|
|
user.getUser(function() {});
|
|
|
|
playbooks.getPlaybooks(function() {});
|
2014-08-24 19:36:34 +02:00
|
|
|
})
|
|
|
|
})
|