angular-ratings

Rating Directive, Icons & CSS for AngularJS

Added by: Sam Deering

GitHub

Repository

thomporter/angular-ratings

Stats

Stars: 43

Watchers: 43

Forks: 17

Module Description

Angular Ratings

A diretive to help out with rating systems on your Angular powered website. This directive automatically notifies the server of the rating change, you just have to tell it a few things and follow a pattern.

Usage

HTML

<angular-ratings ng-model="user_rating" notify-url="notify.json" notify-id="id">

JavaScript

angular.module('myApp', ['ratings']).controller('testCtrl', function($scope){
    $scope.user_rating = 3;
    $scope.id = 1;
    
});

Server Communication

The directive will use the "notify-url" and "notify-id" attributes, along with the user's chosen rating to send a post request to the server. It will look like this:

{notify-url}?id={notify-id}&rating=2

Demo

Visit the demos at angular-ratings.thomporter.com

This directive is also in-use at The Angular List

Module stats last updated: 2017-11-09 15:00:04

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!