July 2017
Intermediate to advanced
384 pages
8h 23m
English
The Rating component provides a star-based rating with the ability to select and cancel. The basic declaration of the component would be as follows:
<p-rating name="basic" [(ngModel)]="angular" ></p-rating>
Here, the rating-bounded value should be a number type. The default visual of an Angular rating will look as shown in the following screenshot:

The star attribute helps to provide the number of stars in the rating. The default value of star is 5.
The behavior of selecting and canceling the rating can be more interactive, and you can get notified with the help of onRate and onCancel callbacks. In the preceding snapshot, the ...
Read now
Unlock full access