Skip to content

Commit

Permalink
fix(demo): avoid removing DOM elements in decimal rating demo
Browse files Browse the repository at this point in the history
Fixes #2178

Closes #2225
  • Loading branch information
maxokorokov authored and pkozlowski-opensource committed Mar 16, 2018
1 parent 5f14b4e commit 40a8281
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<p>Custom rating template provided via a variable. Shows fine-grained rating display</p>

<ng-template #t let-fill="fill">
<span *ngIf="fill === 100" class="star full">&hearts;</span>
<span *ngIf="fill === 0" class="star">&hearts;</span>
<span *ngIf="fill < 100 && fill > 0" class="star">
<span class="star" [class.full]="fill === 100">
<span class="half" [style.width.%]="fill">&hearts;</span>&hearts;
</span>
</ng-template>
Expand Down

0 comments on commit 40a8281

Please sign in to comment.