bioweb  0.09.92
C++/Python(django)/JavaScript(angularJS) framework
services.js
Go to the documentation of this file.
1 
4 angular.module('myAppServices', [])
5  .service('srvInfo', //current information from zsm server
6  function($http) {
7  this.baseURL = client_server_prefix + '/ajax/'; //the prefix defined in version.js
8 
9  this.getVersion = function(callback) {
10  return $http.get(this.baseURL + 'version/get').success(callback);
11  };
12  this.getCurrent = function(callback) {
13  return $http.get(this.baseURL + 'current/get').success(callback);
14  };
15  this.getCppNumber = function(callback) {
16  return $http.get(this.baseURL + 'calcpy/getNumber').success(callback);
17  };
18  })
19  .service('srvCommands', //commands
20  function($http) {
21  this.baseURL = client_server_prefix + '/ajax/calcpy/'; //the prefix is defined in version.js
22 
23  this.getCppCommands = function(callback) {
24  return $http.get(this.baseURL + 'getCommands').success(callback);
25  };
26  this.startCommand = function(callback) {
27  return $http.get(this.baseURL + 'startCommand').success(callback);
28  };
29  });