fix minor bug in the front edn
This commit is contained in:
parent
98235837a2
commit
9ca0d595cf
1 changed files with 6 additions and 6 deletions
10
nodejs/public/javascripts/angularApp.js
vendored
10
nodejs/public/javascripts/angularApp.js
vendored
|
@ -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', {
|
||||||
|
|
Reference in a new issue