Created
February 26, 2013 19:02
-
-
Save aamedina/5041095 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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