
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
angular2-puk-rating
Advanced tools
###Live Demo
Rating system for everything
$ npm install angular2-puk-rating
// app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { RatingComponent } from './puk-rating/puk-rating.component';
@NgModule({
imports: [
BrowserModule,
FormsModule
],
declarations: [
AppComponent,
RatingComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
// app.component.ts
import {Component} from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: 'src/app.html',
styles: [`
.panel {
display: inline-block;
width: 100%;
margin-bottom: 50px;
}
.text{
display: inline-block;
margin-left: 50px;
font-size: 32px;
}
`],
})
export class AppComponent {
public itemImage:any =
{
"puk": 4,
"selectedPuk": 3,
};
public itemSvg:any =
{
"puk": 8,
"selectedPuk": 2,
};
public itemHover:number;
/**
* @name pukChangeSvg
* @param newPukValue
*/
pukChangeSvg(newPukValue:number):void {
this.itemSvg.selectedPuk = newPukValue;
};
/**
* @name pukChangeImage
* @param newPukValue
*/
pukChangeImage(newPukValue:number):void {
this.itemImage.selectedPuk = newPukValue;
};
/**
* @name pukModelHover
* @param pukValue
*/
pukHover(pukValue:number) {
this.itemHover = pukValue;
}
}
<puk-rating
[pukCount]="itemImage.puk"
[pukModel]="itemImage.selectedPuk"
[pukImageHeight]="'90px'"
[pukImageWidth]="'90px'"
[pukEmptyImage]="'http://simpleicon.com/wp-content/uploads/sad.png'"
[pukFullImage]="'src/images/smile.svg'"
(pukClick)="pukChangeImage($event)"
(pukHover)="pukHover($event)">
</puk-rating>
<p class="text">{{itemHover}} puk selected when hover item</p>
Licensed under the MIT license
FAQs
Rating with angular2
We found that angular2-puk-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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.