# ionic-rating
**Repository Path**: assad_2020/ionic-rating
## Basic Information
- **Project Name**: ionic-rating
- **Description**: An angularjs directive that take care of visualising a star rating bar
- **Primary Language**: CoffeeScript
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-12-30
- **Last Updated**: 2021-12-30
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
ionic-rating
============
An angularjs directive that take care of visualising a star rating bar, build
for ionic.

Also able to print half star (display only) :

#### Why?
`angular-ui` has the same [rating](http://angular-ui.github.io/bootstrap/#/rating) directive,
but it is build on top of bootstrap. This repo just reuse most of the js code, but build for
the [ionic](http://ionicframework.com/) framework.
#### How to use?
Install with bower:
```
$ bower install ionic-rating
```
In your index.html
```HTML
```
In you template:
```HTML
```
In you controller:
```JavaScript
// first inject it into your app
angular.module('youApp', ['ionic.rating'])
.controller('yourCtrl', function($scope) {
// set the rate and max variables
$scope.rating = {};
$scope.rating.rate = 3;
$scope.rating.max = 5;
});
```
For strict-di, you can use
```
.controller('RatingController', [ '$scope', '$attrs', 'ratingConfig', function($scope, $attrs, ratingConfig) ]
```
If you want to make it read only
> added readonly="readOnly" to rating directive, and $scope.readOnly = true; to the controller.
**Note:** You may also need to include the style file. But I suggest you just copy it to your
project.
#### Build
```
$ npm i
$ make all
```
#### License
MIT