This repository was archived by the owner on Jun 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathconfig.js
More file actions
45 lines (39 loc) · 1.42 KB
/
config.js
File metadata and controls
45 lines (39 loc) · 1.42 KB
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
(function () {
'use strict';
var app = angular.module('app');
var events = {
// event when the controller has been successfully activated
controllerActivateSuccess: 'controller.activateSuccess',
// event when to toggle the working on it dialog
workingOnItToggle: 'workingonit.toggle',
// event when the security digest has been obtained and/or refreshed
securityDigestRefreshed: 'spContext.digestRefreshed'
};
var config = {
title: 'Learning Path Manager',
// config the exceptionHandler decorator
appErrorPrefix: '[SYSERR] ',
// app events
events: events,
// app version
version: '1.0.0.0',
// debug notification settings
showDebugNotiSetting: false
};
// create a global variable on app called 'config'
app.value('config', config);
// configure the angular logging service before startup
app.config(['$logProvider', function ($logProvider) {
// turn debugging off/on (no info or warn)
if ($logProvider.debugEnabled) {
$logProvider.debugEnabled(true);
}
}]);
// configure the common configuration
app.config(['commonConfigProvider', function (cfg) {
// setup events
cfg.config.controllerActivateSuccessEvent = config.events.controllerActivateSuccess;
cfg.config.workingOnItToggleEvent = config.events.workingOnItToggle;
cfg.config.spContextSecurityDigestRefreshedEvent = config.events.securityDigestRefreshed;
}]);
})();