blob: b7ce983626fe9b449d1adb018f3bdf89c68f07f5 (
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
32
33
34
35
36
37
38
39
40
|
/*******************************************************************************
* Copyright (c) 2015 CableLabs Inc. and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution, and is available at
* http://www.apache.org/licenses/LICENSE-2.0
*******************************************************************************/
// 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);
}());
|