Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 775 Bytes

README.md

File metadata and controls

39 lines (26 loc) · 775 Bytes

minicolors-angular

Simple wrapper for jquery-minicolors.

Installation

Run

$ bower install minicolors-angular

then add jquery.minicolors.css, jquery.minicolors.js and minicolors.angular.js to your HTML.

Usage

Add minicolors module to your app:

angular.module('myApp', ['minicolors'])

Add the directive to your input element as a class or an attribute, and pass the options through the options attribute. The value will be bound to your ng-model.

HTML:

input.minicolors(type="text" ng-model="color" options="{showSpeed: 50}")

JS:

angular.module('myApp').controller('AppCtrl', ['$scope', function ($scope) {
    $scope.color = '#dfdfdf';
}]);