Skip to content
/ ngRaty Public
forked from perryhoffman/ngRaty

A simple AngularJS rating directive using the jQuery Raty plugin. Demo:

License

Notifications You must be signed in to change notification settings

misanet/ngRaty

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngRaty v0.0.1

  • A simple AngularJS directive for the jQuery Raty plugin by wbotelhos

Requirements

Install with Bower

$ bower install ngraty

Getting Started

Include ng-raty into your html, as well as the other dependencies:

  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
  <script type="text/javascript" src="jquery.raty.min.js"></script>
  <script type="text/javascript" src="ngraty.js"></script>

Add the directive to your HTML:

    <div ng-raty="ratyOptions"
         ng-model="rating.current"></div>

Optional mouse-over and mouse-out attributes can be added by passing in functions that take two arguments:

    <div ng-raty="ratyOptions"
         ng-model="rating.current"
         mouse-over="demo.mouseOver(stars, e);"
         mouse-out="demo.mouseOut(stars, e);"></div>

For a full list of available options, check out the Raty Github page

Demo

http://jsfiddle.net/phoffman/x6y26/

About

A simple AngularJS rating directive using the jQuery Raty plugin. Demo:

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 62.3%
  • HTML 37.7%