Skip to content

Commit

Permalink
fix(rating): restore compatibility with TS 1.8
Browse files Browse the repository at this point in the history
Fixes #995

Closes #996
  • Loading branch information
pkozlowski-opensource committed Nov 2, 2016
1 parent 35c0e76 commit 951e538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rating/rating.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface StarTemplateContext {
template: `
<template #t let-fill="fill">{{ fill === 100 ? '&#9733;' : '&#9734;' }}</template>
<span tabindex="0" (mouseleave)="reset()" role="slider" aria-valuemin="0"
[attr.aria-valuemax]="max" [attr.aria-valuenow]="rate" [attr.aria-valuetext]="ariaValueText">
[attr.aria-valuemax]="max" [attr.aria-valuenow]="rate" [attr.aria-valuetext]="ariaValueText()">
<template ngFor [ngForOf]="range" let-index="index">
<span class="sr-only">({{ index < rate ? '*' : ' ' }})</span>
<span (mouseenter)="enter(index + 1)" (click)="update(index + 1)"
Expand Down Expand Up @@ -91,7 +91,7 @@ export class NgbRating implements OnInit,
this.readonly = config.readonly;
}

get ariaValueText() { return `${this.rate} out of ${this.max}`; }
ariaValueText() { return `${this.rate} out of ${this.max}`; }

enter(value: number): void {
if (!this.readonly) {
Expand Down

0 comments on commit 951e538

Please sign in to comment.