Blame view

app/partials/main/main.controller.js 1.07 KB
feacde5ff   Rishav   setup acuefuel in...
1
2
3
4
5
  
  (function() {
      'use strict'
      
      angular.module('acufuel')
429786996   Kuldeep Arora   live flight track...
6
          .controller('MainController', [ '$scope', '$filter','$rootScope','$state', '$window', MainController]);
feacde5ff   Rishav   setup acuefuel in...
7
          
429786996   Kuldeep Arora   live flight track...
8
      function MainController($scope, $filter, $rootScope,$state, $window) {
dd378d69f   Mr. Hot Foods   changes in flight...
9
       
e196b9b74   Anchit Jindal   new changes added
10
      	$scope.currentUserName = JSON.parse(localStorage.getItem('currentUserName'));
429786996   Kuldeep Arora   live flight track...
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
      	console.log("$state====",$state)
  
      	$scope.reloadPage = function(){
      		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"){
                  $window.location.href = '/#!/flightTracking';
                  setInterval(function(){
                      console.log("come")
                      $window.location.reload()
                  },10);
      		}else{   
                  console.log("flight tracking state found=====");
                  $window.location.reload();
              }
      	}
feacde5ff   Rishav   setup acuefuel in...
30
31
      }
  })();
429786996   Kuldeep Arora   live flight track...
32
33
  //
  //