How to show total reviews and average rating?


#1

I am beginner and following a tutorial to make a review products application and rather than just copy pasting the code trying to do some experiment with it to get more depth knowledge. I have one question regarding my app
I added some more functionality to my app and wrote some code in includes.js and reviews.html to show average rating and total reviews of a product . There are two data contexts in reviews.html, one is to show product and its coming from router and second to show reviews and for that i used template helper.
How ever i am unable to understand that how i can show average rating and number of reviews for the product thats been clicked?
You can find source code on my gitHub Repository