2015-01-10 22:11:51 +00:00
|
|
|
// Ionic Starter App
|
|
|
|
|
|
|
|
// angular.module is a global place for creating, registering and retrieving Angular modules
|
|
|
|
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
|
|
|
|
// the 2nd parameter is an array of 'requires'
|
|
|
|
// 'starter.controllers' is found in controllers.js
|
|
|
|
var app = angular.module('starter', ['ionic', 'starter.controllers', 'starter.services']);
|
|
|
|
|
|
|
|
app.run(function($ionicPlatform) {
|
|
|
|
$ionicPlatform.ready(function() {
|
|
|
|
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
|
|
|
|
// for form inputs)
|
|
|
|
if (window.cordova && window.cordova.plugins.Keyboard) {
|
|
|
|
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
|
|
|
|
}
|
|
|
|
if (window.StatusBar) {
|
|
|
|
// org.apache.cordova.statusbar required
|
|
|
|
StatusBar.styleDefault();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
})
|
|
|
|
|
|
|
|
.config(function($stateProvider, $urlRouterProvider) {
|
|
|
|
$stateProvider
|
|
|
|
|
|
|
|
.state('app', {
|
|
|
|
url: "/app",
|
|
|
|
abstract: true,
|
|
|
|
templateUrl: "templates/menu.html",
|
|
|
|
controller: 'AppCtrl'
|
|
|
|
})
|
|
|
|
|
|
|
|
.state('app.jcenews', {
|
|
|
|
url: "/jcenews",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/jceNews.html",
|
|
|
|
controller: 'JCENewsCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-01-20 09:06:17 +00:00
|
|
|
.state('app.calendar', {
|
|
|
|
url: "/calendar",
|
2015-01-10 22:11:51 +00:00
|
|
|
views: {
|
|
|
|
'menuContent': {
|
2015-01-20 09:06:17 +00:00
|
|
|
templateUrl: "templates/calendar.html",
|
|
|
|
controller: 'CalendarCtrl'
|
2015-01-10 22:11:51 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
.state('app.home', {
|
|
|
|
url: "/home",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/home.html",
|
|
|
|
controller: 'homeCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
.state('app.login', {
|
|
|
|
url: "/login",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/loginPage.html",
|
|
|
|
controller: 'LoginCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-01-13 00:14:24 +00:00
|
|
|
.state('app.aguda', {
|
|
|
|
url: "/aguda",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/aguda.html",
|
|
|
|
controller: 'AgudaCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
.state('app.settings', {
|
|
|
|
url: "/settings",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/settings.html",
|
|
|
|
controller: 'SettingsCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2015-01-10 22:11:51 +00:00
|
|
|
.state('app.grades', {
|
|
|
|
url: "/grades",
|
|
|
|
views: {
|
|
|
|
'menuContent': {
|
|
|
|
templateUrl: "templates/grades.html",
|
|
|
|
controller: 'GradesCtrl'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
// if none of the above states are matched, use this as the fallback
|
|
|
|
$urlRouterProvider.otherwise('/app/login');
|
|
|
|
});
|
|
|
|
|
|
|
|
app.config(function($provide) {
|
|
|
|
$provide.decorator('$state', function($delegate, $stateParams) {
|
|
|
|
$delegate.forceReload = function() {
|
|
|
|
return $delegate.go($delegate.current, $stateParams, {
|
|
|
|
reload: true,
|
|
|
|
inherit: false,
|
|
|
|
notify: true
|
|
|
|
});
|
|
|
|
};
|
|
|
|
return $delegate;
|
|
|
|
});
|
|
|
|
});
|