walnut_launchpad.html/js/app.js

129 lines
2.4 KiB
JavaScript

'use strict';
var app = angular.module('launchpad', ['ui.router']);
app.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise('/sign-in');
$stateProvider
.state('app',{
url: '/',
views: {
'header': {
templateUrl: '/templates/partials/header.html',
controller: 'HomeController',
controllerAs: 'vm'
},
'menu': {
templateUrl: '/templates/partials/menu.html'
},
'content': {
templateUrl: '/templates/home.html'
},
'notifications': {
templateUrl: '/templates/partials/notifications.html'
}
}
})
.state('app.home', {
url: 'home',
views: {
'content@': {
templateUrl: 'templates/home.html',
controller: 'HomeController',
controllerAs: 'vm'
}
}
})
.state('app.sign-in', {
url: 'sign-in',
views: {
'content@': {
templateUrl: 'templates/sign-in.html',
controller: 'SignInController',
controllerAs: 'vm'
}
},
resolve: {
loginStatus: function(authService) {
return authService.getUser();
}
}
})
.state('app.bolt', {
url: 'bolt',
views: {
'content@': {
templateUrl: 'templates/bolt.html',
controller: 'BoltController'
}
}
})
.state('app.files', {
url: 'files',
views: {
'content@': {
templateUrl: 'templates/files.html',
controller: 'FilesController'
}
}
})
.state('app.contacts', {
url: 'contacts',
views: {
'content@': {
templateUrl: 'templates/contacts.html',
controller: 'ContactController'
}
}
})
.state('app.contacts.detail', {
url: '/:id',
/*
templateUrl: 'templates/partials/subscriber-detail.html',
controller: 'SubscriberDetailController'
*/
views: {
'detail@app.contacts': {
templateUrl: 'templates/partials/contact-detail.html',
controller: 'ContactDetailController'
}
}
})
.state('app.music', {
url: 'music',
views: {
'content@': {
templateUrl: 'templates/music.html',
controller: 'MusicController'
}
}
})
.state('app.email', {
url: 'email',
views: {
'content@': {
templateUrl: 'templates/email.html',
controller: 'EmailController'
}
}
})
.state('app.website', {
url: 'website',
views: {
'content@': {
templateUrl: 'templates/website.html',
controller: 'WebsiteController'
}
}
})
.state('app.dns', {
url: 'dns',
views: {
'content@': {
templateUrl: 'templates/dns.html',
controller: 'DnsController'
}
}
});
});