Giter VIP home page Giter VIP logo

angular-pick-a-color's Introduction

angular-pick-a-color

AngularJS directive for the pick-a-color JQuery plugin.

https://github.com/lauren/pick-a-color

Installation: Install with bower:

bower install angular-pick-a-color --save

This should grab all the dependancies. Alternatively, download the files from this repo (angular-pick-a-color.js) and also grab the js file and css from the pick-a-color repo…

Then, in your index file, you need to add the following lines -:

<script type="text/javascript" src="vendor/tinycolor/tinycolor.js"></script> <script type="text/javascript" src="vendor/pick-a-color/src/js/pick-a-color.js"></script> <script type="text/javascript" src="vendor/angular-pick-a-color/src/angular-pick-a-color.js"></script>

(obviously change the folder names and the pick-a-color css file might have a version number - take a look at the pick-a-color site).

Usage: Include the 'pickAColor' module in your application and use the following directive in your html. pick-a-color options can be placed in the definition as shown below.

<pick-a-color id="inputColor" ng-model="color" inline-dropdown="true"></pick-a-color>

To set default options, you can use the configuration provider in your apps config method -:

.config(function myAppConfig(pickAColorProvider) {
    pickAColorProvider.setOptions({
        inlineDropdown: true
    });
})

angular-pick-a-color's People

Contributors

bjaraujo avatar cdjackson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

angular-pick-a-color's Issues

Assign value programmatically

It seems to require a watch on the model because it is loosing binding.

   scope.$watch(model, function(value) {
        element.val(model(scope));
    });

Installation problems

Hi, thanks for your work. I have a little bit trouble with the installation of this plugin. Could you please discribe, whtat exactly i have to include to my index.html and my app,js file?

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.