I am developing an application (forecasts for tennis matches)
The final touch before launching the project, I want to add a "delete comment" button.
The button in HTML looks like this:
<button ng-show="" ng-click="deleteComment(comment)" class="glyphicon glyphicon-remove marginio"></button>
An example of a comment with a button you can see by clicking on the link and selecting the forecast "Nadal R. / Verdasco F. vs Bolelli S. / Seppi A." (or themselves quickly register and pee comments anywhere).
I use Firebase's subd, and it turns out that each prediction (predictionId) has its own comments. And I need to make sure that the button is visible only to the user who added this comment. Here I am stuck.
Here is my code: https://github.com/NiR-IT/tennispredictions
service under the comments - scripts / services / comments.js
controller - scripts / controllers / browse.js