;
(function () {
'use strict';
angular
.module('shuichan.app.controller', [])
.controller('AppController', AppController);
AppController.$inject = ['$state', '$ionicSideMenuDelegate', 'AuthenticationServiceConstant', 'AuthenticationService'];
/* @ngInject /
function AppController($state, $ionicSideMenuDelegate, AuthenticationServiceConstant, AuthenticationService) {
// jshint validthis: true
var vm = this;
vm.$state = $state;
vm.accessLevels = AuthenticationServiceConstant.accessLevels;
vm.loggingOut = false;
vm.doLogout = doLogout;
///////////////////////
function doLogout() {
vm.loggingOut = true;
AuthenticationService
.logout()
.then(
function (data) {
$ionicSideMenuDelegate.toggleLeft();
vm.$state.go('app.login');
}
)
.finally(
function () {
vm.loggingOut = false;
}
);
}
};
})();
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
this指向了这个变量vm,这里的this应该就是这个模块