Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eko-rating-input

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eko-rating-input

eko-rating-input is created as input or show Rating stars value to use in forms or on loaded data with a rating input from 1 to 5

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

README.md Install eko-rating-input from npm:

npm i eko-rating-input --save

this package neads to have fontawsome installed.

Click to se Demo

Add needed package to NgModule imports:

import { EkoRatingInputModule } from 'eko-rating-input.module';

@NgModule({
  ...
  imports: [
  ...,
  EkoRatingInputModule,
  ...
  ]
  ...
})

To app.component.ts create the function to get data from eko-rating-input input

export class AppComponent {
...
public ratingValue: number;
...
  getRattingValue(e) {
    console.log('Rating input value: ', e);
    this.ratingValue = e;
  }
...
}

To app.component.html add :

<eko-RatingInput
  (ratingValueOutput)="getRattingValue($event)" // Get value from the clicked star 
  [starColor]="'gold'"
  [labelColor]="'#999'"
  [fontSize]="'28px'"
  [rateNumber]="true"
>Star Ratting</eko-RatingInput>

or if you wane display values from 1 to 5 in star ra ting do this:

<eko-RatingInput
  [starColor]="'gold'"
  [labelColor]="'#999'"
  [fontSize]="'28px'"
  [editable]="false"
  [rateNumber]="true"
  [value]="3"   // Here comes the value of rating 
>Star Ratting</eko-RatingInput>

or just for preview rating:

<eko-RatingInput
  [fontSize]="'16px'"
  [editable]="false"
  [value]="4"
></eko-RatingInput>

if you write [rateNumber]="false" the star preview will not show the star number.

Keywords

FAQs

Package last updated on 03 Apr 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc