How to rename parent node?

我的未来我决定 提交于 2019-12-25 04:03:42

问题


I'm very new in Angularfire. I created a Firebase parent node, with several other parents. Now I need to know how to rename the main parent node.


回答1:


You cannot rename it easily within the console, but you can add a new node with the same content "Meeting with..." and delete the existing node.




回答2:


Thanks Björn, Finally I found it.

 $scope.addMeeting = function(){

          if($scope.meetingEditCheck){
            var key = $scope.editKey;            
            var newPostKey = firebase.database().ref().child('users/' + firebaseUser.uid + '/meetings/' + key);
            newPostKey.update({
                'name': $scope.meetingEditName,
                'date': Firebase.ServerValue.TIMESTAMP
            });
           }


来源:https://stackoverflow.com/questions/39611488/how-to-rename-parent-node

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!