arnaucube
arnaucube/objectImageIdentifierAIPublic Self-hosted repository
objectImageIdentifierAI/smartphoneApp/www/js/app.js
smartphoneApp/www/js/app.jsRaw
 1var urlapi = "http://127.0.0.1:3200/";
 2
 3var selectedImg="";
 4
 5angular.module('app', [
 6    'ionic',
 7    'app.main',
 8    'app.menu'
 9])
10
11  .run(function($ionicPlatform) {
12    $ionicPlatform.ready(function() {
13      // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
14      // for form inputs)
15      if (window.cordova && window.cordova.plugins.Keyboard) {
16        cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
17        cordova.plugins.Keyboard.disableScroll(true);
18
19      }
20      if (window.StatusBar) {
21        // org.apache.cordova.statusbar required
22        StatusBar.styleDefault();
23      }
24    });
25  })
26
27  .config(function($stateProvider, $urlRouterProvider) {
28    $stateProvider
29
30      .state('app', {
31        url: '/app',
32        abstract: true,
33        templateUrl: 'templates/menu.html',
34        controller: 'MenuCtrl'
35      })
36
37      .state('app.main', {
38        url: '/main',
39        views: {
40          'menuContent': {
41            templateUrl: 'templates/main.html',
42            controller: 'MainCtrl'
43          }
44        }
45      });
46    // if none of the above states are matched, use this as the fallback
47    $urlRouterProvider.otherwise('/app/main');
48  });