
Security News
MCP Steering Committee Launches Official MCP Registry in Preview
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
ng-starrating
Advanced tools
[](https://www.npmjs.com/package/ng-starrating/v/1.0.20) [](https://github.com/riteshgandhi/ng-star-rating)
Simple, highly Customizable and Responsive Star Rating Library built using Angular.
For production, use the files from the dist/
folder.
Edge browser support: Import webcomponents bundle for Edge browser
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.4.1/webcomponents-bundle.min.js"></script>
Use one of the following methods to add the Star Rating library to your project:
npm install ng-starrating
//app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RatingModule } from 'ng-starrating';
import { AppComponent } from './app.component';
@NgModule({
declarations: [ AppComponent ],
imports: [ BrowserModule, RatingModule ],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<div style="text-align:center">
<h1>
ng-starrating demo
</h1>
<star-rating value="5" totalstars="5" checkedcolor="red" uncheckedcolor="black" size="24px" readonly="false" (rate)="onRate($event)"></star-rating>
</div>
//app.components.ts
import { Component } from '@angular/core';
import { StarRatingComponent } from 'ng-starrating';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor() { }
ngOnInit() { }
onRate($event:{oldValue:number, newValue:number, starRating:StarRatingComponent}) {
alert(`Old Value:${$event.oldValue},
New Value: ${$event.newValue},
Checked Color: ${$event.starRating.checkedcolor},
Unchecked Color: ${$event.starRating.uncheckedcolor}`);
}
}
Here are the default options
checkedcolor: "gold",
uncheckedcolor: "gray",
size: "24px",
value: 0,
readonly: false,
totalstars: 5
Type: Number
Adds the number of stars. Default value is 5
Type: String
Checked color for the star. Default color is "gold". You can even use color codes.
Type: String
Un-checked color for the star. Default color is "gray". You can even use color codes.
Type: String
Size of the Stars in pixels. Default size is 24px.
Type: Number
Value of the Star Rating. Default value is 0. It can be between 0 to 5. It also supports half rating.
Type: Boolean
Determines whether the star rating component is readonly.
Type: EventEmitter
Custom Event, triggers on change of rating value.
Star Rating uses npm to manage package dependencies.
All changes should be committed to the files in src/
.
v1.0.20 - [2020-02-16]
v1.0.19,18..16 - [2020-02-16]
v1.0.15 - [2020-02-11]
v1.0.14 - [2020-02-11]
v1.0.13 - [2020-02-11]
v1.0.12 - [2020-02-10]
v1.0.11 - [2019-12-10]
v1.0.10 - [2019-12-03]
v1.0.9 - [2019-12-02]
v1.0.8 - Beta [2019-12-02]
v1.0.7 - [2019-07-20]
v1.0.6 - [2019-01-03]
v1.0.5 - [2018-12-31]
v1.0.4 - [2018-12-26]
v1.0.3 - [2018-12-26]
v1.0.2 - [2018-12-26]
v1.0.1 - [2018-12-26]
FAQs
[](https://www.npmjs.com/package/ng-starrating/v/1.0.20) [](https://github.com/riteshgandhi/ng-star-rating)
We found that ng-starrating demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.