jeremykid / ionic-rating

An angularjs directive that take care of visualising a star rating bar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ionic-rating

An angularjs directive that take care of visualising a star rating bar, build for ionic.

rating

Why?

angular-ui has the same rating directive, but it is build on top of bootstrap. This repo just reuse most of the js code, but build for the ionic framework.

How to use?

Install with bower:

$ bower install ionic-rating

In you template:

<rating ng-model="rate" max="max"></rating>

In you controller:

// first inject it into your app
angular.module('youApp', ['ionic.rating'])

.controller('yourCtrl', function($scope) {

  // set the rate and max variables
  $scope.rate = 3;
  $scope.max = 5;

});

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

About

An angularjs directive that take care of visualising a star rating bar

License:MIT License


Languages

Language:CoffeeScript 89.2%Language:Makefile 6.5%Language:CSS 4.3%