Blame view

app/partials/main/main.controller.js 1.21 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

3c77051a2   Kuldeep Arora   updates
12
13
14
          $scope.testFunction = function(){
              $scope.currentUserName = JSON.parse(localStorage.getItem('currentUserName'));
          }
da40330c8   Kuldeep Arora   path change
15
  // Flight Tracking page code
bfb1a2a46   Kuldeep Arora   flight tracking p...
16
      	/*$scope.reloadPage = function(){
429786996   Kuldeep Arora   live flight track...
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   Kuldeep Arora   flight tracking p...
23
                  $window.location.href = '/#!/flightTracking';
429786996   Kuldeep Arora   live flight track...
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   Kuldeep Arora   flight tracking p...
32
33
      	}*/
      
feacde5ff   Rishav   setup acuefuel in...
34
      }
da40330c8   Kuldeep Arora   path change
35

feacde5ff   Rishav   setup acuefuel in...
36
  })();
da40330c8   Kuldeep Arora   path change
37