Semaphore/public/js/routes/router.js

28 lines
610 B
JavaScript
Raw Normal View History

2016-03-18 23:03:28 +01:00
app.config(function ($stateProvider, $urlRouterProvider, $locationProvider, $couchPotatoProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$urlRouterProvider.otherwise('/');
$stateProvider
.state('homepage', {
url: '/',
pageTitle: 'Homepage',
templateUrl: "/public/html/homepage.html"
})
.state('logout', {
url: '/logout',
pageTitle: 'Log Out',
controller: function ($scope) {
window.location = "/logout";
}
})
});
app.run(function($rootScope, $state, $stateParams, $http) {
$rootScope.$state = $state;
$rootScope.$stateParams = $stateParams;
});