From 10eb4471ab820bb2323077cb7be8029a2e9b0759 Mon Sep 17 00:00:00 2001 From: okalintu Date: Tue, 3 Mar 2015 15:46:01 +0200 Subject: sanitized routes --- f/scripts/angular | 1 + f/scripts/client.js | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 120000 f/scripts/angular create mode 100644 f/scripts/client.js (limited to 'f/scripts') diff --git a/f/scripts/angular b/f/scripts/angular new file mode 120000 index 0000000..aaffc07 --- /dev/null +++ b/f/scripts/angular @@ -0,0 +1 @@ +../../node_modules/angular \ No newline at end of file diff --git a/f/scripts/client.js b/f/scripts/client.js new file mode 100644 index 0000000..fb612ed --- /dev/null +++ b/f/scripts/client.js @@ -0,0 +1,26 @@ +var ioc = angular.module('ioc',[]); + +ioc.controller('ioctrl',function($scope){ + var soc= io(); + $scope.que=[]; + $scope.row=""; + $scope.name=""; + $scope.qsize=0; + + $scope.submit = function(){ + soc.emit("queadd",{"row":$scope.row,"name":$scope.name}); + $scope.row=""; + $scope.name=""; + }; + + soc.on("quedata",function(data){ + $scope.que=data; + $scope.qsize=data.length; + $scope.$apply(); + }); + + $scope.popfirst = function(){ + soc.emit("quepopfirst",""); + }; + +}); -- cgit v1.3