Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15747 anikendra 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
// 'starter.controllers' is found in controllers.js
7
angular.module('starter', ['ionic', 'starter.controllers', 'starter.services'])
8
 
9
.run(function($ionicPlatform) {
10
  $ionicPlatform.ready(function() {
11
    // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
12
    // for form inputs)
13
    if (window.cordova && window.cordova.plugins.Keyboard) {
14
      cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
15
    }
16
    if (window.StatusBar) {
17
      // org.apache.cordova.statusbar required
18
      StatusBar.styleDefault();
19
    }
20
  });
21
})
22
 
23
.config(function($stateProvider, $urlRouterProvider) {
24
  $stateProvider
25
 
26
  .state('app', {
27
    url: "/app",
28
    abstract: true,
29
    templateUrl: "templates/menu.html",
30
    controller: 'AppCtrl'
31
  })
32
 
33
  .state('app.events', {
34
    url: "/events",
35
    views: {
36
      'menuContent': {
37
        templateUrl: "templates/events.html",
38
        controller: 'EventsCtrl'
39
      }
40
    }
41
  })
42
 
43
  .state('app.users', {
44
    url: "/users",
45
    views: {
46
      'menuContent': {
47
        templateUrl: "templates/users.html",
48
        controller: 'UsersCtrl'
49
      }
50
    }
51
  })
52
    // .state('app.playlists', {
53
    //   url: "/playlists",
54
    //   views: {
55
    //     'menuContent': {
56
    //       templateUrl: "templates/playlists.html",
57
    //       controller: 'PlaylistsCtrl'
58
    //     }
59
    //   }
60
    // })
61
 
62
  .state('app.single', {
63
    url: "/users/:userId",
64
    views: {
65
      'menuContent': {
66
        templateUrl: "templates/user.html",
67
        controller: 'UserCtrl'
68
      }
69
    }
70
  });
71
  // if none of the above states are matched, use this as the fallback
72
  $urlRouterProvider.otherwise('/app/users');
73
});