Skip to content

Instantly share code, notes, and snippets.

@mikekoro
Created August 7, 2014 23:56
Show Gist options
  • Save mikekoro/67d579604fae6a02173c to your computer and use it in GitHub Desktop.
Save mikekoro/67d579604fae6a02173c to your computer and use it in GitHub Desktop.
.controller('chatCtrl', function($scope, $state) {
// User clicks "Send"
$scope.sendMessage = function(message,recipient) {
if(!message) {
return false
}
var sendMessageQuery = $msg({to: recipient, type: 'chat'}).c('body').t(message);
connect.send(sendMessageQuery);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment