Angular Ratify
This angular component library is planned to hold different sort of rating components needed for an angular application development.
For now, one component is added in this library
How to use?
- Include our
angular-ratify
module inapp.module.ts
; @
- Add the component
<lib-ratify>
where rating part is expected in your application
To brief the signatures of the components as below
[grade]
- pass the rating number to the app i.e. - If rating has to be pre-selected. grade - hold the default value of rating. | type: number[maxRating]
- pass the maximum rating stars needs to be rendered by that component. | type: number[showRatingCounter]
- this boolean value is to decide whether to show the rating value on the screen like 2 out of 5 | type: boolean(triggerRatingSelection)
- This callback will be triggered when user selects the rating in the component.
Sample implementation
app.module.ts
;; ;; @
app.component.html
Lets rate it! Rated to {{myRating}}
app.component.ts
; @ grade = 0; maxRating = 5; showRatingCounter = true; myRating: number; { console; console; thismyRating = rate; }
Snapshots
-
Initial rendering
-
While user hovering on rating component
-
Once, user rate
Thank you, give a try. Welcome!