Code Monkey home page Code Monkey logo

ngx-bar-rating's Introduction

Angular Bar Rating

Minimal, light-weight Angular ratings.

npm npm npm npm


If you like this plugin, please give it a star โญ.

Table of Contents

Install it with npm

npm i ngx-bar-rating

Import BarRatingModule in the root module

import { BarRatingModule } from "ngx-bar-rating";

@NgModule({
  imports: [
    // ...
    BarRatingModule
  ]
})

Import the theme (unless you want to use custom template)

@import '~ngx-bar-rating/themes/br-default-theme';

Add the rating in your template

<bar-rating [(rate)]="rate" [max]="5"></bar-rating>
Name Description Default
[rate] Current rating. Can be a decimal value like 3.14 null
[max] Maximal rating that can be given using this widget 5
[readOnly] A flag that indicates if rating can be changed false
[theme] Theme class, see available themes default
[showText] Display rating title if set, otherwise display rating value false
[titles] Titles array. array should represent all possible values including 0 []
[showText] A flag that indicates if rating is required for form validation false
[required] A flag that indicates if rating is disabled. works only with forms false
[disabled] A flag that indicates if rating is disabled. works only with forms false
(rateChange) A stream that emits when the rating value is changed
(hover) A stream that emits when the rating is hovered
(leave) A stream that emits when the rating is no longer hovered

Custom rating template

The module provides a couple of directives to set custom rating template of your choice.

  • *ratingActive: Set template, when a bar/star is active or hovered.
  • *ratingInactive: Set template, when a bar/star is inactive.
  • *ratingFraction: Set template, when a bar/star is a fraction.

Here are some example:

Bootstrap rating example

<bar-rating [(rate)]="rate" [max]="5">
  <i *ratingActive class="bi bi-star-fill" style="margin: 2px; color: #edb867"></i>
  <i *ratingInactive class="bi bi-star-fill" style="margin: 2px; color: #d2d2d2"></i>
</bar-rating>

FontAwesome rating example

<bar-rating [rate]="rate" (rateChange)="onFaoRate($event)" [max]="10">
  <fa-icon *ratingInactive [icon]="['far', 'star']" [fixedWidth]="true" size="lg" style="color: #d2d2d2"></fa-icon>
  <fa-icon *ratingActive [icon]="['fas', 'star']" [fixedWidth]="true" size="lg" style="color: #50e3c2"></fa-icon>
  <fa-icon *ratingFraction [icon]="['fas', 'star-half-alt']" [fixedWidth]="true" size="lg" style="color: #50e3c2"></fa-icon>
</bar-rating>

Movie rating example

<bar-rating [(rate)]="rate" [max]="4" [theme]="'movie'" [showText]="true"
            [titles]="['Bad', 'Mediocre' , 'Good', 'Awesome']"></bar-rating>

It can be used with Angular forms:

<form #form="ngForm">
  <bar-rating name="rating" [(ngModel)]="formRating" [max]="4" required disabled></bar-rating>
</form>
<p>form is valid: {{ form.valid ? 'true' : 'false' }}</p>
<pre>{{ formRating }}</pre>

And reactive forms:

<form [formGroup]="ratingForm">
  <bar-rating formControlName="rate" [max]="4" required disabled></bar-rating>
</form>
<p>form is valid: {{ form.valid ? 'true' : 'false' }}</p>
<pre>{{ formRating }}</pre>

CSS variables

  • --br-font-size Sets the size of the step for the following themes: [default, square, stars].
  • --br-width Sets the width of the step for the following themes: [stars, square, movie, vertical, horizontal].
  • --br-height Sets the height of the step for the following themes: [stars, square, movie, vertical, horizontal].
  • --br-gap Sets the gap between the stars.
  • --br-active-color Sets active color.
  • --br-inactive-color Sets inactive color.

If you want to use a custom rating template, you don't need to import any CSS theme.

If you want to use one of the predefined themes, you will need to import it in the global style style.scss

  • Pure CSS stars (default) [theme]="'default'"
@import '~ngx-bar-rating/themes/br-default-theme';
  • Horizontal bars [theme]="'horizontal'"
@import '~ngx-bar-rating/themes/br-horizontal-theme';
  • Vertical bars [theme]="'vertical'"
@import '~ngx-bar-rating/themes/br-vertical-theme';
  • Custom stars [theme]="'stars'"
@import '~ngx-bar-rating/themes/br-stars-theme';
  • Movie rating [theme]="'movie'"
@import '~ngx-bar-rating/themes/br-movie-theme';
  • Square rating [theme]="'square'"
@import '~ngx-bar-rating/themes/br-square-theme';

Rating style can be easily customized, check the classes used in any theme and add your own css.

You can also do the same for forms classes such as untouched, touched, dirty, invalid, valid ...etc

Issues

If you identify any errors in this component, or have an idea for an improvement, please open an issue. I am excited to see what the community thinks of this project, and I would love your input!

Author

Murhaf Sousli

ngx-bar-rating's People

Contributors

dependabot[bot] avatar milo526 avatar murhafsousli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ngx-bar-rating's Issues

MatRatingBar

Hello Murhaf!!!
Thank you for sharing of your mat-rating bar.
I just have one question - it is written that option [rate] can take decimal values like 3.14.. etc. I'm trying to use this option with stars theme but unfortunately only whole stars appear without any half parts. Could you please advise how it's possible to use [rate] option and get partly filled stars?
Thank you !!!

The Size of the Star

Hi just wondering whether the component able to allow caller to customize its size. thanks.

Adjusting step, float values

It'd be really nice feature if you could somewhat specify step you want user to input.
<bar-rating [(rate)]="rate" [max]="5" [step]="0.5"></bar-rating>
And user would be able to select halfstars.

1 Minor Bug & Requested features

Hi, Thanks for useful angular module,

  1. [showText] option => when null, must not be show to user but now showed NaN text

  2. Please assign a draggable pointer, and let user define hover mode or dragging mode is needed
    rating-bar

  3. Add class with max selected or hovered item like br-5unit-selected when we selected 5 items

  4. [Rate] option decimal value shown on bar item

Form Validation

Nice control!
Took awhile for me to understand how to get font awesome 4.7.2 to work with it and wrote a new CSS file for it.

But my final issue is with form validation using reactive form and Angular 6.1.10. When I select the rating it triggers the form to be valid when it's not. I looked at the source last Friday to see if I could isolate it but wasn't able to. Triple checked my form validation code as well.

Maybe you can look into this. I would post code but I don't think that will help at the moment unless you ask.

fix rating value for a fraction < 0.5

Fraction works with values with fraction > 0.5 such as 3.65
Given a value of 3.2 will result into 4 stars instead of 3

 /** current code */
fraction= (index + 1 === Math.round(nextValue) && nextValue % 1) >= 0.5

Update the rating from the backend

Hello,

thanks for the great component, i am new to Angular so i am not sure if this is really an issue or a question how it can be done.

i have a page which has several items which need rating (list of items), what i do:

  1. loop through the items with *ngfor
  2. i link the inital rating coming from the model (DB) to the bar rating item:
    <bar-rating [(rate)]="item.rate" [max]="5" (rateChange)="changeRate($event, item.rate, item.id)">
  3. in the function changeRate, i check if the client already voted (using a cookie).
  4. if he already voted i will not count his vote, and the stars should show the intial rating
  5. if it is a new vote, i calculate the new rate and apply it.

Point 4 is the tricky one, it seems that upon click, stars (and hence the model) is already updated.

is there away to catch the event before stars are updated and decide if the update shall proceed or not?
or get the previous rating value alongside the current value

or maybe it is simply i am ignorant and doing it wrongly.

Thanks again for the great component

Decimal ratings wont work

Hi,
Ratings provided in decimals wont work. It gets only the integral part of a number e.g 3.5 will be shown as 3 stars not 3 and half star

Setup Problems with Angular 6

Hi,

i'm trying to use this nice package, but coundn't get it working. Unforunately i don't get an error, the "stars" just don't show up. I followed your setup (installing with npm, adding to import modules, copy code to my component). What can i do to identify the error or get it working?

Kind regards,
Steffi

clicking one bar rating selects all other bar ratings in a list

Hi,

I've bar rating in my component and I've have a list of bar-rating in my component. selecting one bar rating selects all other bar rating automatically. need solution for this. my code is
template: <div class="row m-1 p-2" *ngFor="let item of detailItems; let index">

{{ item }}


<bar-rating
class="rating"
[(rate)]="rate"
[max]="5"
[theme]="'stars'"
[showText]="true"
[titles]="['one', 'two', 'three', 'four', 'five']"
(rateChange)="onRatingChange()"
>

    </div>
  </div>

and in .ts file I've used
public rate: number = 0;

Thanks

Using browser-only version of superagent in non-browser environment

Using browser-only version of superagent in non-browser environment
/ngx-bar-rating/component/bar-rating.component.js:1
(function (exports, require, module, __filename, __dirname) { import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter, forwardRef, ChangeDetectorRef } from '@angular/core';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:607:28)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.ngx-bar-rating/component/bar-rating.component (/dist/server/main.js:11199:18)

Font Awesome doesn't loading

Hello,
I want to use your ngx-bar-rating with font awesome. So I tried to add this as you wrote in readme, but this doesn't working correctly. Bar Rating component appears, and works I mean I can click on this and get value, but there is no icons on bar.

I added in styles.scss this:
@import '~ngx-bar-rating/themes/br-fontawesome-theme';

Next in my component I have this:
<bar-rating name="rating" [theme]="'fontawesome'" [formControl]="form.controls['rate']" [max]="3" required></bar-rating>

When I run this I receive something like this:
screen

In dev console all styles looks ok for me:
screens from console

Do you have any idea what's happening?

Angular 12

It works with force option:

npm i ngx-bar-rating --force

But need update for proper way. I guess it's not hard work due to error:

npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^10.1.3" from [email protected]

Click event

Hi !

I come across an issue.
I have integrated your bar-rating component in the header of an angular tab-group.

But you have this code:

private handleClick(e, value) {
/** (NOT TESTED) Remove 300ms click delay on touch devices */
e.preventDefault();
e.stopPropagation();
this.update(value + 1);
}

The e.stopPropagation seems to prevent me of switching tab by clicking on the header, where your component catches the click.

What do you think ?

Thanks in advance.

User should be able to select randomly stars lets say only star 2& 3

How could i do that oly stars that user will click should be choosen.
thank you

  • Feature Request

Description

What is the use-case or motivation for the new feature?

Which versions are you using for the following packages?

ngx-bar-rating:

Is there anything else we should know?

Not working with Nativescript

I've been trying to make this plugin work with NativeScript+Angular, since it's Angular compatible and only adds UI features, but had no success. Has anyone had success integrating ngx-bar-rating and NativeScript? Any help would be apreciated.

Readonly, stars are br-unit and not br-selected

I need to show the rating as read only so the user can't change the value. I set [readOnly]="true" but the component just showed gray stars. I guess when the component initializes on readOnly, it won't update to show the initial value and then lock. I changed the source and got lucky I guess, and disabled the click event if readOnly and removed another readOnly condition somewhere else. So now it's working the way I would like it.

I still haven't figured out that form validation problem yet.

<bar-rating name="rating" id="rating" [(rate)]="faRate" [theme]="'fontawesome'" [(ngModel)]="model.Rating" [max]="5" [readOnly]="true" >

bar-rating.component.js

import { Component, Input, Output, ChangeDetectionStrategy, EventEmitter, forwardRef, ChangeDetectorRef } from '@angular/core';
import { NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';
/** This allows support [(ngModel)] and ngControl. */
var RATING_VALUE_ACCESSOR = {
    provide: NG_VALUE_ACCESSOR,
    useExisting: forwardRef(function () { return BarRatingComponent; }),
    multi: true
};
/** This allows control required validation. */
var RATING_VALUE_VALIDATOR = {
    provide: NG_VALIDATORS,
    useExisting: forwardRef(function () { return BarRatingComponent; }),
    multi: true,
};
var BarRatingComponent = (function () {
    function BarRatingComponent(changeDetectorRef) {
        this.changeDetectorRef = changeDetectorRef;
        this.contexts = [];
        /** Maximal rating that can be given using this widget. */
        this.max = 5;
        /** A flag indicating if rating can be updated. */
        this.readOnly = false;
        /** Set the theme */
        this.theme = 'default';
        /** Show rating title */
        this.showText = false;
        /** Replace rate value with a title */
        this.titles = [];
        /** A flag indicating if rating is required for form validation. */
        this.required = false;
        /** An event fired when a user is hovering over a given rating.
         * Event's payload equals to the rating being hovered over. */
        this.hover = new EventEmitter();
        /** An event fired when a user stops hovering over a given rating.
         * Event's payload equals to the rating of the last item being hovered over. */
        this.leave = new EventEmitter();
        /** An event fired when a user selects a new rating.
         * Event's payload equals to the newly selected rating. */
        this.rateChange = new EventEmitter(true);
        this.onChange = function (_) { };
        this.onTouched = function () { };
    }
    BarRatingComponent.prototype.ngOnChanges = function (changes) {
        if (changes['rate']) {
            this.update(this.rate);
        }
    };
    BarRatingComponent.prototype.ngOnInit = function () {
        var _this = this;
        this.contexts = Array.from({ length: this.max }, function (context, i) {
            return ({
                selected: false,
                fraction: false,
                click: function (e) { return _this.handleClick(e, i + 1); },
                enter: function () { return _this.handleEnter(i + 1); }
            });
        });
        this.updateState(this.rate);
    };
    BarRatingComponent.prototype.update = function (newRate, internalChange) {
        if (internalChange === void 0) { internalChange = true; }
        if (!this.disabled && this.rate !== newRate) {
            this.rate = newRate;
            this.rateChange.emit(this.rate);
        }
        if (internalChange) {
            this.onChange(this.rate);
            this.onTouched();
        }
        this.updateState(this.rate);
    };
    /** Reset rate value */
    BarRatingComponent.prototype.reset = function () {
        this.leave.emit(this.nextRate);
        this.updateState(this.rate);
    };
    BarRatingComponent.prototype.updateState = function (nextValue) {
        var _this = this;
        /** Set rate value as text */
        this.nextRate = nextValue - 1;
        /** Set the rating */
        this.contexts = Array.from({ length: this.max }, function (context, index) {           
            return ({
                selected: index + 1 <= nextValue,
                fraction: (index + 1 === Math.round(nextValue) && nextValue % 1) >= 0.5,
                click: function (e) { return _this.handleClick(e, index); },
                enter: function () { return _this.handleEnter(index); }
            });                        
        });
    };
    BarRatingComponent.prototype.handleClick = function (e, value) {
        /** (NOT TESTED) Remove 300ms click delay on touch devices */
        if (!this.readOnly) {
            e.preventDefault();
            e.stopPropagation();
            this.update(value + 1);  
        }              
    };
    BarRatingComponent.prototype.handleEnter = function (index) {
        if (!this.disabled && !this.readOnly) {
            /** Add selected class for rating hover */
            this.contexts.map(function (context, i) {
                context.active = i <= index;
                context.fraction = false;
                context.selected = false;
            });
            this.nextRate = index;
            this.hover.emit(index);
        }
    };
    /** This is the initial value set to the component */
    BarRatingComponent.prototype.writeValue = function (value) {
        this.update(value, false);
        this.changeDetectorRef.markForCheck();
    };
    BarRatingComponent.prototype.validate = function (c) {
        return (this.required && !c.value) ? { required: true } : null;
    };
    BarRatingComponent.prototype.registerOnChange = function (fn) {
        this.onChange = fn;
    };
    BarRatingComponent.prototype.registerOnTouched = function (fn) {
        this.onTouched = fn;
    };
    BarRatingComponent.prototype.setDisabledState = function (isDisabled) {
        this.disabled = isDisabled;
    };
    return BarRatingComponent;
}());
export { BarRatingComponent };
BarRatingComponent.decorators = [
    {
        type: Component, args: [{
            selector: 'bar-rating',
            template: "\n    
\n\n
\n\n
\n\n
\n\n
{{ nextRate | rateTitle: titles}}
\n
\n ", styles: ["\n *{box-sizing:border-box}.br{position:relative;margin:15px 0}.br-units{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.br-unit{cursor:pointer;-webkit-font-smoothing:antialiased;text-rendering:auto}.br-disabled .br-unit,.br-readonly .br-unit{cursor:default}\n "], providers: [RATING_VALUE_ACCESSOR, RATING_VALUE_VALIDATOR], changeDetection: ChangeDetectionStrategy.OnPush },] }, ]; /** @nocollapse */ BarRatingComponent.ctorParameters = function () { return [ { type: ChangeDetectorRef, }, ]; }; BarRatingComponent.propDecorators = { 'rate': [{ type: Input },], 'max': [{ type: Input },], 'readOnly': [{ type: Input },], 'theme': [{ type: Input },], 'showText': [{ type: Input },], 'titles': [{ type: Input },], 'required': [{ type: Input },], 'hover': [{ type: Output },], 'leave': [{ type: Output },], 'rateChange': [{ type: Output },], }; //# sourceMappingURL=bar-rating.component.js.map

How to select and show float rating?

I am working on a rating section where I want ratings out of five. I want float values to be select from stars and show half star for 0.5.
Is it possible with this plug in, If it is possible then tell me the solution.

Unable to show fractional value like 3.7 or 4.2

it's only show half and full star rating. it's not able to show 3.7 or 4.2 something rating in star.

I have used 'fontawesome-o' also.

@import '~ngx-bar-rating/themes/br-fontawesome-o-theme';

[theme]="'fontawesome-o'"

image

is there any way to show that value?

Angular 11

I am submitting a

  • Feature Request

Description

Getting this error because the ngx-bar-rating uses angular 10.
Using npm install --legacy-peer-deps works fine. But of course would be nice to just have this up to date :)

npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^11.0.4" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^10.1.3" from [email protected]
npm ERR! node_modules/ngx-bar-rating
npm ERR!   ngx-bar-rating@"^2.0.0" from the root project

What is the use-case or motivation for the new feature?

Support for Angular 11 projects.

Which versions are you using for the following packages?

ngx-bar-rating: 2.0.0

Is there anything else we should know?

Very useful project, thank you!

Stars not visible

I have implemented everything as mentioned in the readme but nothing is visible. It leaves empty space instead of stars.

how to Add a min attribute

I am using your rating bar on my website
is there any way I could change the min from 1 to 0.
I feel that it is an important feature not only for me.
it does not work for me that the user will leave the bar empty- because my bar is in a form & the form will only be valid when all the fields are valid- touched.
thank you

Default class is overwriting

screen shot 2018-07-28 at 5 45 38 pm

Hi,
I am using ngx-bar-rating square theme.But somehow Default class is getting created because of which square with star is showing up .

     <ng-template ngbPanelContent>
                            <div class=".col-xs">
                                <nb-card class=".col-xs" class=".space">
                                    <nb-card-body>
                                        <table style="width: 80%;">
                                            <tbody>
                                                <tr *ngFor="let f of feedback" class="question">
                                                    <td>{{f.questions}}</td>
                                                    <td><bar-rating [rate]="f.rating" [max]="5" class="br br-square" [readOnly]="true" style="float: right;"></bar-rating></td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </nb-card-body>
                                </nb-card>
                            </div>
                        </ng-template>

'bar-rating' is not a known element, Angular 9

Hi, I have followed the README file to install it, but when show it
through the HTML file it give me an error:
`'bar-rating' is not a known element:

  1. If 'bar-rating' is an Angular component, then verify that it is part of this module.
  2. If 'bar-rating' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.ng`

I have added it in app.module.ts and imports section, any small help?
Sorry for my english.

Font-Awesome CSS for 4.7.2

This took me hours to figure out, because Font-Awesome changed the way they use CSS. But on version 4.7.2, the last free version using solid, brand and regular, the provided examples didn't work. I created 4 of these to represent different sizes just like fa-2x, fa-4x, in which below is the large size. I renamed it scss so I can use it in my Angular 6.1.10 project but I haven't any variables yet. Still being tested but works fine.
The problem was with the font family name and :after not rendering anything. I changed it to :before

Just wanted to contribute in case someone else has the problem. So It's not an issue.

br-fontawesome-4X.scss

.br-fontawesome .br-units {
    align-items: center
}

.br-fontawesome .br-unit {
    font: normal normal normal 60px/1 FontAwesome;
    font-family: 'Font Awesome 5 Free';    
    font-size: 4rem;
    font-weight: 900;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    text-decoration: none;
    margin-right: 2px
}

.br-fontawesome .br-unit:before {
    content: '\f005';
    color: #d2d2d2
}

.br-fontawesome .br-selected:before {
    font-family: 'Font Awesome 5 Free';
    color: #ffdf00
}

.br-fontawesome .br-active:before {
    color: #ffdf00
}

[rate] decimal

<bar-rating [(rate)]="cssRate" [rate]="4.5" [wholeStars]="true" [readOnly]="true" [max]="5">

this works corrently, but not paint half star. can you check please

CSS half stars

Currently CSS stars do not support half-star hating, it can be easly done with a overflow: hidden wrapper and some absolute positioning to "crop" the yellow star in the half.

Multiple Line Display

Is there a way to display the star ratings on multiple lines?

For example, if I have a rating system out of 10, is there a way to display the bar as 2 rows of 5?

Custom decimal rating

It's good to be a difference between filling stars by 5.1 and 5.8.
I mean the 5.8 should fill the last star by 80% and 5.1 should fill the last star by 10%

Error not compatible with Angular Ivy

run on Angular 9.1.0

Error: Failed to compile entry-point ngx-bar-rating (module as esm5) due to compilation errors:
node_modules/@angular/common/common.d.ts:115:22 - error NG6002: Appears in the NgModule.imports of BarRatingModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/common) which declares CommonModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

115 export declare class CommonModule {
                         ~~~~~~~~~~~~
node_modules/@angular/forms/forms.d.ts:2699:22 - error NG6002: Appears in the NgModule.imports of BarRatingModule, but could not be resolved to an NgModule class.

This likely means that the library (@angular/forms) which declares FormsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

2699 export declare class FormsModule {
                          ~~~~~~~~~~~

No output to browser when implementing this library

I am submitting a

  • Bug Report

What is the expected behavior?

Should at least display something

What is the current behavior?

No output to browser

What are the steps to reproduce?

  • npm i ngx-bar-rating
    Add 'BarRatingModule' to root module imports

Add this to the view
<bar-rating [rate]=5 [max]="5">

What is the use-case or motivation for changing an existing behavior?

Which versions are you using for the following packages?

@angular-devkit/architect 0.900.7
@angular-devkit/build-angular 0.1001.7
@angular-devkit/core 9.0.7
@angular-devkit/schematics 10.2.3
@angular/cdk 10.2.7
@angular/cli 10.2.3
@angular/fire 5.4.2
@angular/material 10.2.7
@schematics/angular 10.2.3
@schematics/update 0.1002.3
rxjs 6.6.6
typescript 4.0.7
"ngx-bar-rating": "^2.0.0",

Is there anything else we should know?

No errors in browser console

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.