Open renomi opened 3 years ago
Hello @renomi , try with this
<ionic-rating-component #rating activeColor="#FFC200" halfStar="true" _[rating]="0"_
(ratingChanged)="onRatingChange($event)">
</ionic-rating-component>
Another option is to declare a type number variable in the controller:
rate-page.ts
…..
rate : number = 0;
…..
export class RatePage {
constructor() {
}
}
rate-page.html
<ionic-rating-component #rating activeColor="#FFC200" halfStar="true" rating="{{number}}"
(ratingChanged)="onRatingChange($event)">
</ionic-rating-component>
Having the same issue. For me as a tmp workaround - remove default value. Disabling strictTemplate for entire project is not a solution for me.
Hey there, thanks for the great component!
If tsconfig.app.json has
And inside any page add the following:
Running
ionic serve
will fail with Type 'string' is not assignable to type 'number'.ionic info: