Added socket.io lib. Created a temporary Sockets tab for socket connection testing. Streamlined login process to use scope callbacks.

This commit is contained in:
Chris Houseknecht
2014-04-14 15:11:01 -04:00
parent 54aabb75cd
commit 1b242926e9
173 changed files with 44361 additions and 67 deletions
+26
View File
@@ -0,0 +1,26 @@
/************************************
* Copyright (c) 2014 AnsibleWorks, Inc.
*
* Sockets.js
* SocketsController- simple test of socket connection
*
*/
'use strict';
function SocketsController ($scope, ClearScope, Socket) {
ClearScope();
var socket = Socket({ scope: $scope });
socket.init(); //make the connection
$scope.messages = ['Stuff happened', 'message received', 'blah blah bob blah'];
socket.on('anything', function(data) {
$scope.messages.push(data);
});
}
SocketsController.$inject = [ '$scope', 'ClearScope', 'Socket'];