Created
May 19, 2016 08:07
-
-
Save deanhume/f315ac070bc4a1aed08cc2fab4e4de2f to your computer and use it in GitHub Desktop.
Firebase save data
This file contains hidden or 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
var messagesRef = new Firebase('https://brilliant-fire-3159.firebaseio.com'); | |
var messageField = document.getElementById('messageInput'); | |
// Save data to firebase | |
function savedata(){ | |
var message = messageField.value; | |
messagesRef.push({fieldName:'messageField', text:message}); | |
messageField.value = ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment