Guest User

app.js

a guest
Apr 18th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Ionic Starter App
  2.  
  3. // angular.module is a global place for creating, registering and retrieving Angular modules
  4. // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
  5. // the 2nd parameter is an array of 'requires'
  6. angular.module('starter', ['ionic'])
  7.  
  8. .run(function($ionicPlatform) {
  9.   $ionicPlatform.ready(function() {
  10.     // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
  11.     // for form inputs)
  12.     if(window.cordova && window.cordova.plugins.Keyboard) {
  13.       cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
  14.     }
  15.     if(window.StatusBar) {
  16.       StatusBar.styleDefault();
  17.     }
  18.   });
  19. })
  20.  
  21.  
  22. .config(function($stateProvider, $urlRouterProvider) {
  23.   $stateProvider
  24.  
  25.     .state('app', {
  26.         url: '/app',
  27.         abstract: true,
  28.         templateUrl: 'templates/menu.html',
  29.      })
  30.     .state('app.home', {
  31.         url: '/home',
  32.         views: {
  33.         'menuContent': {
  34.         templateUrl: 'templates/Home.html'
  35.         }
  36.         }
  37.     })
  38.     .state('app.profile', {
  39.         url: '/profile',
  40.         views: {
  41.         'menuContent': {
  42.         templateUrl: 'templates/Profile.html'
  43.         }
  44.         }
  45.     })
  46.     .state('app.locate', {
  47.         url: '/locate',
  48.         views: {
  49.         'menuContent': {
  50.         templateUrl: 'templates/locate.html',
  51.         controller: 'MapCtrl'
  52.         }
  53.         }
  54.     })
  55.    
  56.     .state('app.notifications', {
  57.         url: '/notifications',
  58.         views: {
  59.         'menuContent': {
  60.         templateUrl: 'templates/Notifications.html'
  61.         }
  62.         }
  63.     })
  64.     .state('app.bug', {
  65.         url: '/bug',
  66.         views: {
  67.         'menuContent': {
  68.         templateUrl: 'templates/ReportBug.html'
  69.         }
  70.         }
  71.     })
  72.     .state('app.settings', {
  73.         url: '/settings',
  74.         views: {
  75.         'menuContent': {
  76.         templateUrl: 'templates/Settings.html'
  77.         }
  78.         }
  79.     })
  80.     .state('app.contact', {
  81.         url: '/contact',
  82.         views: {
  83.         'menuContent': {
  84.         templateUrl: 'templates/ContactUs.html'
  85.       }
  86.       }
  87.     });
  88.  
  89.  
  90.   // if none of the above states are matched, use this as the fallback
  91.   //$urlRouterProvider.otherwise('/app/playlists');
  92.     $urlRouterProvider.otherwise('/app/home');
  93. });
Add Comment
Please, Sign In to add comment