Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
ng-rating-pro
Advanced tools
A powerful and customizable Angular rating component that allows full and half ratings with support for read-only mode, dynamic scaling, and SVG customization.Perfect for use in reviews, feedback forms, and rating-based applications.
A powerful and customizable Angular rating component that allows full and half ratings with support for read-only mode, dynamic scaling, and SVG customization.
Perfect for use in reviews, feedback forms, and rating-based applications.
readonly
mode for display-only purposes.Upcoming Features
Install the package via npm:
npm install ng-rating-pro
Add the NgRatingProComponent to your Angular module:
import { NgModule } from "@angular/core";
import { NgRatingProComponent } from "ng-rating-pro";
@NgModule({
declarations: [
// other components
NgRatingProComponent,
],
exports: [
NgRatingProComponent, // Make it available for use in other modules
],
})
export class AppModule {}
Use the ngRatingPro selector in your Angular template:
<ngRatingPro
[scale]="5"
[rating]="3.5"
[allowHalf]="true"
[size]="24"
[spacing]="10"
[readonly]="false"
(ratingChange)="onRatingChange($event)"
></ngRatingPro>
Input | Type | Default Value | Description |
---|---|---|---|
scale | number | 5 | Number of stars to display. |
rating | number | 0 | Initial rating value. Can be updated dynamically. |
allowHalf | boolean | true | Allows half-star ratings when true . |
size | number | 20 | Size of the stars in pixels. |
spacing | number | 8 | Space between stars in viewBox units. |
readonly | boolean | false | Disables click interactions when set to true . |
Output | Type | Description |
---|---|---|
ratingChange | number | Emits the updated rating whenever a star is clicked. |
onRatingChange(newRating: number): void {
console.log('Updated Rating:', newRating);
}
See CHANGELOG.md
for realease notes and changelog.
Contributions are welcome! If you'd like to improve this component:
Read
CONTRIBUTIONS.md
for more info.
This project is licensed under the MIT License. See the LICENSE
file for details.
FAQs
A powerful and customizable Angular rating component that allows full and half ratings with support for read-only mode, dynamic scaling, and SVG customization.Perfect for use in reviews, feedback forms, and rating-based applications.
We found that ng-rating-pro demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.