Skip to content
Related Articles

Related Articles

Save Article
Improve Article
Save Article
Like Article

How to make Rating using Angular UI Bootstrap ?

  • Last Updated : 06 Jun, 2021

In this article we will see how to make Dropdown using Angular UI bootstrap.

Angular UI Bootstrap is an Angular JS framework created by Angular UI developers for providing better UI which can be used easily.


<div uib-rating></div>

Download AngularUI from the link:



  • First, add Angular UI bootstrap scripts needed for your project.

<script src=””></script>
<script src=””></script>
<script src=””></script>
<script src=””></script>

  • Make rating with its UIBootStrap classes which will set the UI look for the rating.
  • Now make different types of rating using different classes and run the code.



<!DOCTYPE html>
<html ng-app="gfg">
    <!-- Adding CDN scripts required for our page -->
    <script src=
    <script src=
    <script src=
    <script src=
    <link href=
        // Adding Modules
        angular.module('gfg', ['ngAnimate', 'ngSanitize', 'ui.bootstrap']);
        angular.module('gfg').controller('rating', function ($scope) {
            $scope.rate = 4;
            $scope.max = 12;
            $scope.isReadonly = false;
            $scope.hov = function (value) {
                $scope.over = value;
                $scope.per = 100 * (value / $scope.max);
    <div ng-controller="rating">
        <!-- making a rating -->
        <div class="loumn">
            <span uib-rating ng-model="rate" max="max" 
                read-only="isReadonly" on-hover="hov(value)"
                on-leave="over = null" titles=
            <span class="label"
                ng-class="{'label-warning': per<30, 
                    'label-info': per>=30 && per<70
                    'label-success': per>=70}"
                ng-show="over && !isReadonly">{{per}}%</span>



My Personal Notes arrow_drop_up
Recommended Articles
Page :