Socket
Book a DemoInstallSign in
Socket

ngx-rating-stars

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-rating-stars

A simple rating stars component

0.2.5
latest
npmnpm
Version published
Maintainers
1
Created
Source

ngx-rating-stars

https://ibb.co/K9y7725

Installation

npm install ngx-rating-stars@latest

Usage

ngModule

import { NgxRatingStarsModule } from 'ngx-rating-stars'

@NgModule({
    ...
    imports: [
		...
        NgxRatingStarsModule
        
    ]
})

angular.json

"build": {
	...
	"assets": [
		{
			"glob": "**/*",
			"input": "./node_modules/ngx-rating-stars/images",
			"output": "./assets/images"
		}
	]
}

template

<ngx-rating-stars 
	[rating]="rating" 
	[style]="ratingStyle" 
	[showRatingInNumericFormat]="true">
</ngx-rating-stars>

component

rating = {
	value:3.6,
	count:12
}

ratingStyle = {
	starsStyle: {'height' : '22px', 'width' : '22px'},
	ratingStyle: {'font-size' : '18px'},
	countStyle: {'font-size' : '14px'}
}

The object rating has the value of rating and the count of all ratings (12 votes) proprieties. The object ratingStyle has informations for styles.

Demo

https://stackblitz.com/github/AndreaDiCioccio/ngx-rating-stars-demo

Keywords

angular

FAQs

Package last updated on 01 Dec 2020

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.