app.js 1.1 KB

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