Skip to content
Snippets Groups Projects
Select Git revision
  • bcfd7af0f0374bab415e25f38e446faf2a7dc024
  • master default protected
  • chrome-manifest-v3
  • feature/migrate-cordova-13
  • feat/improve-network-scan
  • feat/force-migration-check
  • develop
  • feature/encrypted_comment
  • feature/android_api_19
  • gitlab_migration_1
  • rml8
  • v1.7.15-rc1
  • v1.7.14
  • v1.7.13
  • v1.7.12
  • v1.7.11
  • v1.7.10
  • v1.7.9
  • v1.7.8
  • v1.7.7
  • v1.7.6
  • v1.7.5
  • v1.7.4
  • v1.7.3
  • v1.7.2
  • v1.7.1
  • v1.7.0
  • v1.7.0-rc2
  • v1.7.0-rc1
  • v1.6.12
  • v1.6.11
31 results

app-controllers.js

Blame
  • app-controllers.js 19.27 KiB
    angular.module('cesium.app.controllers', ['cesium.platform', 'cesium.services'])
    
      .config(function($stateProvider, $urlRouterProvider) {
        'ngInject';
    
        $stateProvider
    
          .state('app', {
            url: "/app",
            abstract: true,
            templateUrl: "templates/menu.html",
            controller: 'AppCtrl',
            data: {
              large: false
            }
          })
    
          .state('app.home', {
            url: "/home?error",
            views: {
              'menuContent': {
                templateUrl: "templates/home/home.html",
                controller: 'HomeCtrl'
              }
            }
          })
    
          .state('app.lock', {
            cache: false,
            url: "/lock",
            views: {
              'menuContent': {
                templateUrl: "templates/common/view_passcode.html",
                controller: 'PassCodeCtrl'
              }
            }
          })
        ;
    
        // if none of the above states are matched, use this as the fallback
        $urlRouterProvider.otherwise('/app/home');
    
      })
    
      .controller('AppCtrl', AppController)
    
      .controller('HomeCtrl', HomeController)
    
      .controller('PluginExtensionPointCtrl', PluginExtensionPointController)
    
    ;
    
    /**
     * Useful controller that could be reuse in plugin, using $scope.extensionPoint for condition rendered in templates
     */
    function PluginExtensionPointController($scope, PluginService) {
      'ngInject';
      $scope.extensionPoint = PluginService.extensions.points.current.get();
    }
    
    /**
     * Abstract controller (inherited by other controllers)
     */
    function AppController($scope, $rootScope, $state, $ionicSideMenuDelegate, $q, $timeout,
                           $ionicHistory, $controller, $window, csPlatform, csSettings, CryptoUtils, csCrypto,
                           UIUtils, BMA, csWallet, Device, Modals, csConfig, csHttp
    ) {
      'ngInject';
    
      $scope.walletData  = csWallet.data;