npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-rating

v3.0.3

Published

A simple component for star ratng in Angular 1.5

Downloads

10

Readme

Angular Rating

is a module to help you create a rating with some cusomizable options

Rating Example

Current Version

3.0.3

Installation

bower install angular-rating --save

OR

npm install angular-rating --save

Requirements

Usage

Setup

Just include the js file to your html

<script src="/path/to/angular-rating.js"></script>

Then, include the module in your code:

angular.module('myModule', ['angular-rating'];

Directive

This is a component, so at its most basic:

<rating value="foo" max="5"></rating>

This will render the rating contained in foo with maximum 5 stars, and 5 is the default if you don't provide max attribute.

foo should be an Integar:

foo = 1;
foo = 3;
foo = 4;

Attributes

  • value is the only required attribute that should contain Integar as I mentioned above.
  • max is optional and this is the whole number of stars you want to show at a time.
  • size is optional, this option is to provide the size of stars as you want to view them and also provide its unit as well (20px is the default in case it's not provided), just like:
    <rating value="foo" size="30px"></rating>
    <rating value="foo" size="10em"></rating>
  • color is optional, this is the color of the filled stars, so you can choose a color of your choice if not it will be #F3D82C as default value, the color can be a litteral color or HEX color prefixed by #.
    <rating value="foo" color="red"></rating>
    <rating value="foo" color="#333"></rating>
  • interactive is optional, by default it's true, that means you can change the rating but if you assign it to false the rating will be disabled.

License

MIT

Authors

  • Medhat Dawoud (@med7atdawoud)
  • Peter Sobhy