New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to show multiple ratings #10
Comments
In the ionic-rating.js, change the following: At the scope, add index: '=index' At the call to the Callback, add the "index" parameter (2 places) In your HTML file, define the index parameter inside the ng-repeat like: In your js file, add the index parameter to the callback definition: and the callback itself: |
Hi dude, i put the ionic-ratings inside ion-slide, but i want to update de rating value every time the slide has changed (I'm getting the 'avg' value form my DB), How can I change the value of avg every time you change the slide? $scope.ratingsObjectAvg = { |
Its working for me what should you do
}` So It will display different stars |
In order to create multiple rating for multiple user for example, try the folloing :
Then in your controller :
And finally your html should look like this :
|
Where to add factory code? |
I am trying to figure out how to pass ratingObj in an ngRepeat. If it is a single object, it is quite simple, but if there is a list of ratings that I am fetching then it is not clear how to display it.
I was thinking along these lines, but it complains for undefined variable for scope.ratingsObj
Assuming ratingList is a list of ratingObjects that I create after fetching the list of ratings from server, then
complains with TypeError: Cannot read property 'iconOn' of undefined, which is because of scope.ratingsObj being undefined.
The text was updated successfully, but these errors were encountered: