-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.ctrl.js
29 lines (29 loc) · 900 Bytes
/
index.ctrl.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
* Created by ZJon 2017/10/16.
* 首页控制
*/
define(['app'], function (app) {
'use strict';
app.controller('IndexCtrl', ['$scope','$rootScope','$timeout','$state',
function ($scope,$rootScope,$timeout,$state) {
console.log(11111111111111)
// if(AuthHandler.isLogined()){
// console.log("已登录");
//
// }else{
// console.log("未登录");
// $location.path("/login");
// }
/*
* 菜单刷新高亮显示
* */
$scope.currentURL ={
currentType:"main"
};
$rootScope.$on("$stateChangeSuccess",function (event) {
$timeout(function(){
$scope.currentURL.currentType = $state.$current.name;
},200)
});
}]);
});