Avoids javascript errors 17/5917/1
authorJosé Bollo <jose.bollo@iot.bzh>
Wed, 8 Jun 2016 05:52:44 +0000 (07:52 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Wed, 8 Jun 2016 09:48:35 +0000 (11:48 +0200)
But doesn't make AfbAngular functionnal.

Change-Id: I643c81792fa757710327a8f66a79a1c8173ebe75
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
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) {