Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Rounding issue with star-rating #3413

Closed
bodiam opened this issue Mar 20, 2015 · 0 comments
Closed

Rounding issue with star-rating #3413

bodiam opened this issue Mar 20, 2015 · 0 comments

Comments

@bodiam
Copy link

bodiam commented Mar 20, 2015

When using the star rating, the rating doesn't handle fractions correctly, causing ratings like 7.1 to be displayed as 8 stars, instead of applying a rounding.

I'm not sure how to fix it, but the problem is caused by the rating.html, in this code:

$index < value

When applying rounding here, this would work, but I'm not sure how I can inject Math into this template. If someone can explain me how, I don't mind creating a pull request with appropriate tests.

@wesleycho wesleycho added this to the 0.13.0 milestone Mar 23, 2015
ayakovlevgh pushed a commit to ayakovlevgh/bootstrap that referenced this issue Mar 24, 2015
- Moved rounding logic into a formatter
- Checking for number instead of checking if undefined
- Using angular.isNumber for rounding logic
- Using bitwise instead of modulo to check for decimel

Fixes angular-ui#3413
Closes angular-ui#3415
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants