ngx-rating-stars
Advanced tools
Comparing version 0.0.8 to 0.1.0
{ | ||
"$schema": "../../node_modules/ng-packagr/package.schema.json", | ||
"name": "ngx-rating-stars", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"description": "A simple rating stars component", | ||
@@ -6,0 +6,0 @@ "author": "Andrea Di Cioccio", |
# ngx-rating-stars | ||
This library is still under development, is not stable. | ||
## Installation | ||
```bash | ||
npm install ngx-rating-stars@latest | ||
``` | ||
Copy the stars images files in /assets/images | ||
##Usage | ||
ngModule | ||
```typescript | ||
import { NgxRatingStarsModule } from 'ngx-rating-stars' | ||
@NgModule({ | ||
... | ||
imports: [ | ||
... | ||
NgxRatingStarsModule | ||
] | ||
}) | ||
``` | ||
template | ||
```html | ||
<ngx-rating-stars [rating]="rating" [size]="size"></ngx-rating-stars> | ||
``` | ||
component | ||
```typescript | ||
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 | ||
76542
20
50