8000 GitHub - SimpleApp/angular-colorpicker: Wrapper around vanderlee Colorpicker for angularjs
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SimpleApp/angular-colorpicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery.colorpicker v0.9.3 - as Angular-ui directive v0.0.1

angular-ui-colorpicker is Copyright (c) 2012 Simple App Licensed under the MIT.

original code from jQuery.colorpicker is Copyright (c) 2011-2012 Martijn W. van der Lee Licensed under the MIT.

What is it

This code is a first try of wrapping jQuery.colorpicker as a angularjs directive. project structure is angular-seed port is heavily inspired by angular-ui.datepicker

How do you use it

This directive should probably be packaged in the angular-ui project. I don't have the time to package it properly for now (fork welcome). At the time, simply look at index.html and controller.js to see how you can configure the picker and bind it to the model. The directive itself (which you will probably copy/paste in your code) is in app/js/directives.js

Features

ngModel bindable Full support for original colorpicker options (it's really just a wrapper). Options for the picker are set in the controller's scope using a scope variable whose name is passed as a parameter for the directive.

Example

See in app/index.html. Briefly :

index.html :

...
<input sa-colorpicker="coloroptions" ng-model="mycolor"></input>
...

Controller.js

...
$scope.mycolor = 'FF0000';
$scope.coloroptions = {
	parts: 'full',
	showOn: 'both',
	buttonColorize: true,
	showNoneButton: false,
	alpha: false
};
...

About

Wrapper around vanderlee Colorpicker for angularjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%
0