why return the code instead of the meaning



  • why return the code instead of the meaning

    $scope.profileThenEdit = {
        userEdit: function () {
            ref.child('users').child(ref.getAuth().uid).child('mailregister').once("value", function (snapshot) {
                return snapshot.child("edit").val()
            });
        }
     };
     $scope.$watch('profileThenEdit.userEdit', function (dataLoaded) {
        console.log(dataLoaded);
        //if (dataLoaded) {
        //    $location.path('profile');
        //} else {
        //    $location.path('editprofile');
        //}
    });
    


  • Because the value of the properties is being traced. profile ThenEdit.userEdit - it's a characteristic. function

    Such images in the log are the function itself, not the result of its challenge.

    It's worth drawing attention to this function. Nothing comes back.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2