You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

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