Import

import-rating.ts
import { NuiRating } from '@needless-ui/angular/rating';

NuiRating

A radio group of stars, or a read-only picture of a rating.

Selector
[nuiRating]
NuiRating: Properties
NameTypeDefaultDescription
valueTwo-waynumber | nullnullThe rating, or null. Also works with forms.
maxInputnumber5Number of stars.
readonlyInputbooleanfalseShows the value, to any fraction, instead of asking for one.
disabledInputbooleanfalseDisables every star.
clearableInputbooleanfalseChoosing the current star again clears the rating.
nameInputstringName shared by the radio buttons. Generated by default.
starLabelInput(value: number) => stringAccessible name of each star, as a function of its value.
readonlyLabelInput(value: number, max: number) => stringAccessible name in read-only mode.