is a module to help you create a rating with some cusomizable options
3.0.3
bower install angular-rating --save
OR
npm install angular-rating --save
- AngularJS Version 1.5 at least
- Bootstrap CSS
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'];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;valueis the only required attribute that should contain Integar as I mentioned above.maxis optional and this is the whole number of stars you want to show at a time.sizeis 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>coloris optional, this is the color of the filled stars, so you can choose a color of your choice if not it will be#F3D82Cas 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>interactiveis optional, by default it'strue, that means you can change the rating but if you assign it tofalsethe rating will be disabled.
MIT
- Medhat Dawoud (@med7atdawoud)
- Peter Sobhy
