fix minor bug in the front edn

This commit is contained in:
Shannon Sterz 2016-02-23 22:57:11 +01:00
parent 98235837a2
commit 9ca0d595cf

View file

@ -7,16 +7,16 @@ app.config(['$stateProvider', '$urlRouterProvider',function($stateProvider, $url
url: '/home', url: '/home',
templateUrl: '/home.html', templateUrl: '/home.html',
controller: 'MainCtrl', controller: 'MainCtrl',
resolve: {
postPromise: ['arduino', function(arduino) {
return arduino.getRCs();
}]
},
onEnter: ['$state', 'auth', function ($state, auth) { onEnter: ['$state', 'auth', function ($state, auth) {
if (!auth.isLoggedIn()) { if (!auth.isLoggedIn()) {
$state.go('login'); $state.go('login');
} }
}] }],
resolve: {
postPromise: ['arduino', function(arduino) {
return arduino.getRCs();
}]
}
}) })
.state('login', { .state('login', {