Skip to main content

angular bootstrap - How to use Rating

app.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})


export class AppComponent {
  currentRate:number = 3;
}
app.component.html

<h4 style="padding-top:25px; padding-bottom:25px;">
  Angular Bootstrap - How to use Rating
</h4>

<h6 style="padding-bottom:12px;">
  Current Rate: <b>{{currentRate}}</b>
</h6>

<ngb-rating [(rate)]="currentRate"></ngb-rating>
More Angular tutorials