blob: 199048b63545c86dd5972854eb3cf2e3669d3d76 (
plain)
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
|
// Create our module
var app = angular.module("vcpe", []);
(function() {
var MainController = function($http, $log, cosServices, eplServices, mefServices, model, dbg ) {
dbg.p("---> in MainController()");
// config our app
var cfgFile = "../config.json";
$http.get(cfgFile).
success(function(data) {
dbg.p("in cfgFile read callback");
dbg.p("incoming data");
dbg.pj(data);
cosServices.setCosUrl(data.cosMgr);
eplServices.setEplUrl(data.eplMgr);
mefServices.setEvcUrl(data.evcMgr);
mefServices.setUniUrl(data.uniMgr);
mefServices.setEvcPathUrl(data.evcPathMgr);
model.setAvailableUnis(data.uniList);
}).
error(function() {
dbg.e("Could not read " + cfgFile);
});
};
// register controller in the module
app.controller("MainController", MainController);
}());
|