Chat formatting

This commit is contained in:
AlexKvazos
2015-04-28 10:49:49 -05:00
parent 16da80bf5a
commit 542ae1f549
9 changed files with 85 additions and 7 deletions
+20
View File
@@ -0,0 +1,20 @@
/**
* Connect Controller
*/
module.exports = function($scope, socket) {
$scope.chat = '';
$scope.send = function() {
if ($scope.chat.trim().length > 0) {
socket.emit('chat', {
message: $scope.chat.trim()
});
$scope.chat = '';
}
}
};