mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-22 16:20:44 +01:00
35 lines
777 B
JavaScript
35 lines
777 B
JavaScript
define([
|
|
'app',
|
|
'services/user'
|
|
], 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";
|
|
}
|
|
})
|
|
})
|
|
.run(function($rootScope, $state, $stateParams, $http, user) {
|
|
$rootScope.$state = $state
|
|
$rootScope.$stateParams = $stateParams
|
|
|
|
user.getUser(function() {})
|
|
|
|
$http.get('/playbooks').success(function(data, status) {
|
|
$rootScope.playbooks = data.playbooks;
|
|
})
|
|
})
|
|
}) |