-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerURLChange
More file actions
25 lines (23 loc) · 976 Bytes
/
ServerURLChange
File metadata and controls
25 lines (23 loc) · 976 Bytes
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
/* self.getBillerCodes= function() {
$.get("http://localhost:7777/public/biller-codes.json", function (data) {
self.BillerCodes = JSON.parse(data);
})
}*/
self.server_url=ko.observable();
//self.BillerCodes=ko.observable();
self.getBillerCodes=function(url){
$.get(url+"/public/biller-codes.json", function (data) {
self.BillerCodes=JSON.parse(data);
});
}
if (Params.baseModel.cordovaDevice()) {
Platform.getInstance().then(function (platform) {
self.server_url(platform("getServerURL"));
self.getBillerCodes(self.server_url());
});
}else {
// self.server_url("http://localhost:7777");
self.server_url(window.location.protocol+"//"+window.location.host)
self.getBillerCodes(self.server_url());
}
// self.getBillerCodes();