From 9fee39e5dc717a5605dbce69eae6fddfcf660956 Mon Sep 17 00:00:00 2001 From: Jan Pantel Date: Thu, 7 Nov 2013 09:07:54 +0100 Subject: [PATCH] Added minified version --- angular-sails.min.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 angular-sails.min.js diff --git a/angular-sails.min.js b/angular-sails.min.js new file mode 100644 index 0000000..5bad150 --- /dev/null +++ b/angular-sails.min.js @@ -0,0 +1 @@ +(function(e,t){"use strict";var n=e.module("ngSails",[]);n.service("$sails",["$rootScope",function(e){var n=t.connect(),r=false,i=null;n.on("connect",function(){r=true;if(typeof i==="function"){i();i=null}});n.on("disconnect",function(){r=false});return{reconnect:function(e,t){var s=function(){n.disconnect();if(n.socket!==undefined){n.socket.connect(e,t)}};if(r===true){s()}else{i=s}},disconnect:function(){n.disconnect()},emit:function(e,t){n.emit(e,t)},on:function(t,r){n.on(t,function(){var t=arguments;e.$apply(function(){r.apply(n,t)})})},get:function(t,r){n.get(t,function(){var t=arguments;e.$apply(function(){r.apply(n,t)})})},post:function(t,r,i){n.post(t,r,function(){var t=arguments;e.$apply(function(){i.apply(n,t)})})},put:function(t,r,i){n.put(t,r,function(){var t=arguments;e.$apply(function(){i.apply(n,t)})})},"delete":function(t,r,i){n.delete(t,r,function(){var t=arguments;e.$apply(function(){i.apply(n,t)})})}}}])})(angular,io) \ No newline at end of file