Blame view

app/scripts/controllers.js 1.21 KB
e4e496d13   Rishav   setup admin acufu...
1
  /**
9835dbe3e   Rishav   module name changes
2
   * acuefuel - Responsive Admin Theme
e4e496d13   Rishav   setup admin acufu...
3
4
5
6
7
8
   *
   */
  
  /**
   * MainCtrl - controller
   */
3433be3d6   Rishav   update status and...
9
  function MainCtrl($scope, $location, $state, $rootScope, LoginService) {
e4e496d13   Rishav   setup admin acufu...
10
11
12
13
14
  
      $scope.userName = 'Dylan Goodwin';
      $scope.helloText = 'Welcome in SeedProject';
      $scope.descriptionText = 'It is an application skeleton for a typical AngularJS web app. You can use it to quickly bootstrap your angular webapp projects and dev environment for these projects.';
      
a80703599   Rishav   FBO department fu...
15
16
17
      $scope.logout = function(){
      	console.log("Called")
      	LoginService.logout();
d5fb510e5   Rishav   fbo client page i...
18
      	$state.go('login')
a80703599   Rishav   FBO department fu...
19
      }
3433be3d6   Rishav   update status and...
20
21
22
23
24
25
26
27
28
29
30
      console.log($location)
      $rootScope.$on('$stateChangeStart', function(event, next, nextParams, fromState) {
          console.log(next)
          if(next.name == "index.fboAdmin" || next.name == "index.dashboard" || next.name == "index.updateFBO"){
              $scope.headingName = 'FBO Admin Conductor';
          }else if(next.name == "index.flightDept" || next.name == "index.flight" || next.name == "index.updateFBODept"){
              $scope.headingName = 'Flight Department Admin Conductor';
          }else{
              $scope.headingName = '';
          }
      })
e4e496d13   Rishav   setup admin acufu...
31
32
33
34
  };
  
  
  angular
9835dbe3e   Rishav   module name changes
35
      .module('acuefuel')
e4e496d13   Rishav   setup admin acufu...
36
      .controller('MainCtrl', MainCtrl)