app.js 1.0 KB

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