Skip to content

Instantly share code, notes, and snippets.

@aamedina
Created February 26, 2013 19:02
Show Gist options
  • Save aamedina/5041095 to your computer and use it in GitHub Desktop.
Save aamedina/5041095 to your computer and use it in GitHub Desktop.
events: {
"click #exec-sql": "executeQuery"
},
executeQuery: ƒ(event) {
var self = this;
event.preventDefault();
socket.emit('sqlQuery', { query: 'select * from up_core_flight;' });
socket.on('sqlResults', ƒ(data) {
console.log('clicked');
// every click binds this event to the element again
self.$('#sql-results').text(data.rows);
});
return false;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment