0.0.2 • Published 5 years ago
ngx-rate v0.0.2
NgxRating
Angular 7, Material based library. Thought for user feedback and rating.
Installation
ngx-rate
is only available via npm
Using npm:
$ npm i ngx-rate
Usage
Import NgxRatingModule
in in the root module(AppModule
):
// Import library module
import { NgxRatingModule } from 'ngx-rate';
@NgModule({
imports: [
// ...
NgxRatingModule
]
})
export class AppModule { }
Now use in your template
<ngx-rating></ngx-rating>
Options up to 12/04/2019
<ngx-rating [stars]="3" [size]="30" [margin]="10" [emptyColor]="blue"
[filledColor]="green" (onValueChange)="yourFunction($event)"
</ngx-rating>
- stars: Amount of stars to be used, default is 5.
- size: Size in px for the stars, default is 21px.
- margin: Distance in px between each star, default is 0px.
- emptyColor: Color in RGB to be used when a star is not filled, default is black.
- filledColor: Color in RGB to be used when a star is filled, default is yellow.
- onValueChange: Event triggered when the value changes.