Last active
December 12, 2016 10:41
-
-
Save phsacramento/0789661257fbd5170525a690bf6ecb3a to your computer and use it in GitHub Desktop.
Firebase counter increment
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
var vm = this; | |
var databaseColumn = firebase.database().ref('database'); | |
vm.count = 0; | |
databaseColumn.on('value', function(snapshot) { | |
snapshot.forEach(function() { | |
$scope.count++; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment