-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.js
65 lines (59 loc) · 2.53 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
angular.module('noagendaqsoparty', ['ui.bootstrap', 'ui.utils', 'ngRoute', 'ngAnimate', 'ngSanitize', 'LocalStorageModule', 'angulartics', 'angulartics.google.analytics', 'ngFileReader']);
angular.module('noagendaqsoparty').config(function ($routeProvider, constants) {
$routeProvider.when(constants.siteUris.home, {templateUrl: constants.partials.home});
$routeProvider.when(constants.siteUris.register, {templateUrl: constants.partials.register});
$routeProvider.when(constants.siteUris.login, {templateUrl: constants.partials.login});
$routeProvider.when(constants.siteUris.logbook, {templateUrl: constants.partials.logbook});
$routeProvider.when(constants.siteUris.contestlog, {templateUrl: constants.partials.contestlog});
$routeProvider.when(constants.siteUris.contestlog + '/:id', {templateUrl: constants.partials.contestlog});
$routeProvider.when(constants.siteUris.results, {templateUrl: constants.partials.results});
$routeProvider.when(constants.siteUris.rules, {templateUrl: constants.partials.rules});
$routeProvider.when(constants.siteUris.upload,{templateUrl: constants.partials.upload});
/* Add New Routes Above */
$routeProvider.otherwise({redirectTo: constants.siteUris.home});
})
.config(function (localStorageServiceProvider) {
localStorageServiceProvider
.setPrefix('NoAgendaQSOParty');
})
.run(function ($rootScope) {
$rootScope.safeApply = function (fn) {
var phase = $rootScope.$$phase;
if (phase === '$apply' || phase === '$digest') {
if (fn && (typeof(fn) === 'function')) {
fn();
}
} else {
this.$apply(fn);
}
};
})
.run(function (logging) {
logging.init('main');
logging.setLogLevel(log4javascript.Level.ALL);
logging.setLogAppender(new log4javascript.BrowserConsoleAppender());
})
.run(function (mongolab) {
mongolab.setApiKey('uBNL_OFgaJ77eIEA0ZLFmwFcvuVLVv0o');
})
.run(function (contestantDataService) {
contestantDataService.init();
})
.run(function (dialog) {
dialog.init();
})
.run(function (errors) {
errors.init();
})
.run(function (notification) {
notification.init();
})
.run(function (authenticate) {
authenticate.init();
})
.run(function (contestLogDataService){
contestLogDataService.init();
})
.run(function (qsoRecordDataService){
qsoRecordDataService.init();
});