ngx-rating-stars
This library is still under development, is not stable.
Installation
npm install ngx-rating-stars@latest
Copy the stars images files in /assets/images
##Usage
ngModule
import { NgxRatingStarsModule } from 'ngx-rating-stars'
@NgModule({
...
imports: [
...
NgxRatingStarsModule
]
})
template
<ngx-rating-stars [rating]="rating" [size]="size"></ngx-rating-stars>
component
rating = {
value:3.6,
count:12
}
size = {
starsStyle: {'height' : '22px', 'width' : '22px'},
ratingStyle: {'font-size' : '18px'},
countStyle: {'font-size' : '14px'}
}
The object rating has the value and the count of all rating (12 votes).
The object size has informations for styles