how to get firebase.database.Reference full path

后端 未结 3 2032
感动是毒
感动是毒 2021-01-17 22:54

consider

var adaRef = firebase.database().ref(\"users/ada\");

How can I get the full path of ref ? that is \"users/ada\" ?

3条回答
  •  -上瘾入骨i
    2021-01-17 23:17

    On new versions of the framework you could use:

    snapshot.ref.path.toString()

    being snapshot the result of a call on a Database Reference.

    Maybe this can be helpful.

提交回复
热议问题