Install with npm
$ npm install mi-angular-color-picker --save
Copy css/colorpicker.css and js/mi-angular-color-picker.js. Add a dependency to your app, for instance:
# app.js
require('mi-angular-color-picker');
angular.module('myApp', ['mi.ColorPicker'])
in your controller model:
vm.fields = [
{
key: 'backgroundColor',
type: 'colorpicker',
defaultValue: '#961c1c',
templateOptions: {
label: 'ColorPicker',
placeholder: 'ColorPicker',
required: true,
colorPickerFormat: '\'hex\'',
colorPickerAlpha: true,
colorPickerPos: '\'top left\'',
colorPickerSwatchBootstrap: false
},
validation: {
show: true
}
}
];
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
This library is under the MIT license.