Abdur Rahim
Abdur Rahim

Reputation: 4021

put a text side of a primeng rating component

Here is the StackBlitz of my problem

<h6>
  <p-rating [(ngModel)]="raitng" [cancel]="false" ></p-rating>
<span> (5)</span>
</h6>

I want the last <span>5</span> just in the right or left side of the Rating component. How do I do this. Please see the StakBlitz

Thanks.

Upvotes: 0

Views: 586

Answers (1)

Tahsin G&#252;l
Tahsin G&#252;l

Reputation: 118

Just put your ngModel with string interpolation to between span tags Like:

<h6>
  <p-rating [(ngModel)]="raitng" [cancel]="false" ></p-rating>
<span> {{raitng}}</span>
</h6>

Updated On right side just add style="display: inline-block;" to p-rating element like:

<h6>
  <p-rating [(ngModel)]="raitng" style="display: inline-block;" [cancel]="false" ></p-rating>
<span> {{raitng}}</span>
</h6>

Upvotes: 2

Related Questions