
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@software-scientists/ngx-star-rating
Advanced tools
Simple Angular rating control from angular2 application using fontawesome icon.
Simple Angular rating control from angular2 application using fontawesome icon.
Install npm module:
npm install ngx-star-rating --save
Include fontawesome css:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
Import NgxStarRatingModule
module in your app, and use a component in your html:
import { NgxStarRatingModule } from 'ngx-star-rating';
// Include tag into your component
<ngx-star-rating [formControl]="rating" [id]="'rating'" [disabled]="true"></ngx-star-rating>
<ngx-star-rating>
:
`[(ngModel)] | formControl = ngModel or formControl
'[id] = Unique id for each control
[disabled]="true|false"
= Enable/Disable star rating. Default is false.
// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgxStarRatingModule } from 'ngx-star-rating';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AppRoutingModule,
NgxStarRatingModule,
FormsModule,
ReactiveFormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent {
public form: FormGroup;
constructor(private fb: FormBuilder){
this.rating3 = 0;
this.form = this.fb.group({
rating: ['', Validators.required],
})
}
}
// app.component.html
<form [formGroup]="form">
<ngx-star-rating formControlName="rating" [id]="'rating'"></ngx-star-rating>
<div>Rating: {{form.value.rating}}</div>
<p>form is valid: {{ form.valid ? 'true' : 'false' }}</p>
</form>
FAQs
Simple Angular rating control from angular2 application using fontawesome icon.
The npm package @software-scientists/ngx-star-rating receives a total of 0 weekly downloads. As such, @software-scientists/ngx-star-rating popularity was classified as not popular.
We found that @software-scientists/ngx-star-rating 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.