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.

44 lines
1.1 KiB

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