Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
angular-star-rating
Advanced tools
Angular Star Rating is a Angular1.5 component written in typescript.
Angular Star Rating is a >1.5 Angular component written in typescript.
It is based on a fully customizable css only star rating component written in scss.
Get Angular Star Rating:
$ npm install angular-star-rating
from your console$ bower install angular1-star-rating
from your consoleLoad library
<script src="bower_components/angular-star-rating/dist/index.js"></script>
Inject it into angular
angular.module('myApp', ['star-rating'])
Use it
<star-rating-comp
size="'large'"
rating="3"
text="'Rating:'"
on-update="crtl.onUpdate(rating)">
</star-rating-comp>
id: string (Optional)
The html id attribute of the star rating
Default: undefined
<star-rating-comp id="'my-id'"></star-rating-comp>
rating: number (Optional)
The actual star rating value
Default: undefined
<star-rating-comp rating="3"></star-rating-comp>
showHalfStars: boolean (Optional)
To show half stars or not
Options: true, flase
Default: false
<star-rating-comp show-half-stars="true"></star-rating-comp>
numOfStars: number (Optional)
The possible number of stars to choose from
Default: 5
<star-rating-comp num-of-stars="6"></star-rating-comp>
text: string (Optional)
The text next to the stars.
Default: undefined
<star-rating-comp text="'My text!'"></star-rating-comp>
labelPosition: starRatingPosition (Optional)
The position of the label
Options: top, right, bottom, left
Default: left
<star-rating-comp label-position="'top'"></star-rating-comp>
spread: boolean (Optional)
If the start use the whole space or not.
Default: false
<star-rating-comp spread="true"></star-rating-comp>
size: starRatingSizes (Optional)
The height and width of the stars.
Options: small, medium, large
Default: middle
<star-rating-comp size="'small'"></star-rating-comp>
color: starRatingColors (Optional)
Possible color names for the stars.
Options: default, negative, middle, positive
Default: undefined
<star-rating-comp color="'positive'"></star-rating-comp>
disabled: boolean (Optional)
The click callback is disabled, colors are transparent
Default: false
<star-rating-comp disabled="true"></star-rating-comp>
readOnly: boolean (Optional)
The click callback is disabled
Default: false
<star-rating-comp read-only="true"></star-rating-comp>
speed: starRatingSpeed (Optional)
The duration of the animation in ms.
Options: immediately, noticeable, slow
Default: noticeable
<star-rating-comp speed="'slow'"></star-rating-comp>
starType: starRatingStarTypes (Optional)
The type of start resource to use.
Options: svg, icon, image
Default: svg
<star-rating-comp star-type="'icon'"></star-rating-comp>
onClick: Function (Optional)
Callback function for star click event
Params: rating
<star-rating-comp on-click="ctrl.onClick(rating)"></star-rating-comp>
onUpdate: Function (Optional)
Callback function for rating update event
Params: rating
<star-rating-comp on-update="ctrl.onUpdate(rating)"></star-rating-comp>
getColor: Function (Optional)
Calculation of the color by rating.
Params: rating, number,numOfStars and staticColor
Return: color name
<star-rating-comp get-color="ctrl.getColor(rating, numOfStars, staticColor)"></star-rating-comp>
getHalfStarClass: Function (Optional)
Calculation for adding the "half" class or not, depending on the rating value.
Params: rating
Return: boolean
<star-rating-comp get-half-star-class="ctrl.getHalfStarClass(rating)"></star-rating-comp>
FAQs
Angular Star Rating is a fully featured and configurable Angular UI component.
The npm package angular-star-rating receives a total of 1,329 weekly downloads. As such, angular-star-rating popularity was classified as popular.
We found that angular-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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.