Blame view
app/partials/main/main.controller.js
1.21 KB
feacde5ff
|
1 2 3 4 5 |
(function() { 'use strict' angular.module('acufuel') |
429786996
|
6 |
.controller('MainController', [ '$scope', '$filter','$rootScope','$state', '$window', MainController]); |
feacde5ff
|
7 |
|
429786996
|
8 |
function MainController($scope, $filter, $rootScope,$state, $window) { |
dd378d69f
|
9 |
|
e196b9b74
|
10 |
$scope.currentUserName = JSON.parse(localStorage.getItem('currentUserName')); |
429786996
|
11 |
|
3c77051a2
|
12 13 14 |
$scope.testFunction = function(){ $scope.currentUserName = JSON.parse(localStorage.getItem('currentUserName')); } |
da40330c8
|
15 |
// Flight Tracking page code |
bfb1a2a46
|
16 |
/*$scope.reloadPage = function(){ |
429786996
|
17 18 19 20 21 22 |
console.log("if",$state) console.log("=========state name",$state.current.name); // $state.go('app.flightTracking', {}, {reload: 'app.flightTracking'}) //$state.go($state.current, {}, {reload: true}); if($state.current.name != "app.flightTracking"){ |
bfb1a2a46
|
23 |
$window.location.href = '/#!/flightTracking'; |
429786996
|
24 25 26 27 28 29 30 31 |
setInterval(function(){ console.log("come") $window.location.reload() },10); }else{ console.log("flight tracking state found====="); $window.location.reload(); } |
bfb1a2a46
|
32 33 |
}*/ |
feacde5ff
|
34 |
} |
da40330c8
|
35 |
|
feacde5ff
|
36 |
})(); |
da40330c8
|
37 |