I need some help to pass rating value to the HTML page.
Profile.page.ts
logRatingChange(rating){
//code to calculate avg rating
rating = 4.5;
}
Profile.page.html
<ionic4-star-rating #rating
activeIcon = "ios-star"
defaultIcon = "ios-star-outline"
activeColor = "#488aff"
defaultColor = "#f4f4f4"
halfStar = "true"
readonly="false"
rating= "" <-----Passing the rating value here
fontSize = "32px"
(ratingChanged)="logRatingChange($event)">
</ionic4-star-rating>
I'm not sure how to pass the rating to the component in HTML page. So sorry if this question is too noobish, since I can't find anything online related to this.
Thank you very much for your help.