Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
ngx-stars-rating
Advanced tools
## Overview Ngx Stars Rating is a straightforward Angular module designed for Angular 14 and above. It offers customizable star icons using Material Icons, Antd Icons, and other options.
Ngx Stars Rating is a straightforward Angular module designed for Angular 14 and above. It offers customizable star icons using Material Icons, Antd Icons, and other options.
Explore the live demo here.
Ensure you have Angular 13 or a later version installed.
To install the ngx-stars-rating
module via npm, navigate to your project directory and run:
cd project_folder
npm install --save ngx-stars-rating
NgxStarsRatingModule
into your Angular module:import { NgxStarsRatingModule } from 'ngx-stars-rating';
@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, NgxStarsRatingModule],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {}
<ngx-stars-rating>
component to your HTML file:<!-- app.component.html -->
<ngx-stars-rating></ngx-stars-rating>
rate
, options
, and handling events such as (onRate)
:<ngx-stars-rating
[rate]="rateNumber"
[options]="ratingOptions"
(onRate)="onClickRate($event)"
[starTemplate]="starCustomTemplate"
></ngx-stars-rating>
import { IRatingOptions } from 'ngx-stars-rating';
export class AppComponent {
public rateNumber: number = 4.7;
public ratingOptions: IRatingOptions = {
starsCount: 5,
hoverable: true,
clickable: true
};
public onClickRate(rate: number): void {
console.log(rate, 'rate'); // Logs the clicked star number
}
}
<ng-template #starCustomTemplate>
<span class="material-symbols-outlined" style="font-size: 55px">star</span>
</ng-template>
In future versions, support for Forms and ReactiveForms (ngModel and formControl/formControlName) directives will be added.
FAQs
## Overview Ngx Stars Rating is a straightforward Angular module designed for Angular 14 and above. It offers customizable star icons using Material Icons, Antd Icons, and other options.
The npm package ngx-stars-rating receives a total of 80 weekly downloads. As such, ngx-stars-rating popularity was classified as not popular.
We found that ngx-stars-rating demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.