Closed JeongJun-Lee closed 4 years ago
in Template: <ionic4-star-rating halfStar="true" activeColor="#ffce00" defaultColor="#ffce00" rating=5 [readonly]="isReadonly" (ratingChanged)="onRateChange($event)"> </ionic4-star-rating>
<ionic4-star-rating halfStar="true" activeColor="#ffce00" defaultColor="#ffce00" rating=5 [readonly]="isReadonly" (ratingChanged)="onRateChange($event)"> </ionic4-star-rating>
in Component: isReadOnly: boolean = true;
isReadOnly: boolean = true
But, even the rating is a read-only state, we can modify it.
Example: https://stackblitz.com/edit/ionic-4-angular-8-start-template-l5as1d?file=src%2Fapp%2Ftab2%2Ftab2.page.html
[readonly]="isReadonly?'true':'false'"
in Template:
<ionic4-star-rating halfStar="true" activeColor="#ffce00" defaultColor="#ffce00" rating=5 [readonly]="isReadonly" (ratingChanged)="onRateChange($event)"> </ionic4-star-rating>
in Component:
isReadOnly: boolean = true
;But, even the rating is a read-only state, we can modify it.
Example: https://stackblitz.com/edit/ionic-4-angular-8-start-template-l5as1d?file=src%2Fapp%2Ftab2%2Ftab2.page.html