Avoids javascript errors
[src/app-framework-binder.git] / test / AfbAngular.js
index 3db1ad5..71338cf 100644 (file)
     this.ws = null;
   }
 
+  // prototype of functions linked to AfbContext object
   AfbContext.prototype = {
+    // call using websockets
     call: function(method, query) { return getws(this).call(method, query); },
+
+    // call using get
     get: function(method, query) { return $http.get(this.uhttp+method, mixtu(this, query)); },
-    post: function(method, query) { return $http.post(this.uhttp+method, mixtu(this, query)); },
+
+    // call using post
+    post: function(method, query) { return $http.post(this.uhttp+method, mixtu(this, query)); }
   };
 
+  // get the current websocket
   function getws(ctxt) {
     return ctxt.ws || (ctxt.ws = new AfbWebSocket(ctxt));
   }
 
+  // inserts the current token in the answer
   function mixtu(ctxt, query) {
     return ("token" in query) ? query : angular.extend({token:ctxt.token},query);
   }
 
 
 
+/*
 
 
 
        function call(method, request) {
        }
 
+*/
+
 /*
   // Factory is a singleton and share its context within all instances.
   AfbClientModule.factory('AppCall', function ($http, AppConfig, $log) {