Issue
Hello I have the following code, and I want to replace the long ID with my variable but I am not sure how can I insert the variable in between. I want it to be 'cursos.curso.calificaion': calificacion, were curso is the variable. Thank you
examAttempt(user: any, curso: any, calificacion: any) {
this.afs.doc(`users/${user.id}`).update({
'cursos.tkGXjZLxRdg1TcXGGCD0.calificaion': calificacion,
'cursos.tkGXjZLxRdg1TcXGGCD0.intentos': 5
});
}
Solution
What I did is save the route of how to fin d on firebase in a string variable and just pasted the variable.
Answered By - alberto cruz
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.