Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.get_user_locations = function () {
- firebase.auth().onAuthStateChanged(function (user) {
- if (user) {
- var returned_locations = firebase.database().ref('user_locations/');
- returned_locations.on('value', function (snapshot) {
- $scope.user_locations = snapshot.val();
- });
- } else {
- $state.go('login');
- }
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement