Giter VIP home page Giter VIP logo

Comments (5)

cdjackson avatar cdjackson commented on June 19, 2024

If you’re using bower (??), then you should just be able to type “bower install angular-pick-a-color —save”. Alternatively, download the files from this repo (angular-pick-a-color.js) and also grab the js file 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>

<link rel="stylesheet" type="text/css" href="vendor/pick-a-color/src/js/pick-a-color.css"/>

(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).

Easiest is to use bower :)

Let me know how it goes…

Chris

from angular-pick-a-color.

cschaf avatar cschaf commented on June 19, 2024

Hi,
thanks for the quick answer,
the installation has been successfull completed. I got an error while using the directive, like in your description.

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

__________________________________________________________________________

TypeError: undefined is not a function
    at http://localhost:8100/lib/angular-pick-a-color/src/angular-pick-a-color.js:76:29
    at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:14471:13)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13875:15)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13878:13)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13878:13)
    at nodeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:14465:24)
    at compositeLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13875:15)
    at publicLinkFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13780:30)
    at boundTranscludeFn (http://localhost:8100/lib/ionic/js/ionic.bundle.js:13894:21)
    at controllersBoundTransclude (http://localhost:8100/lib/ionic/js/ionic.bundle.js:14492:18) <input type="text" id="inputColor" name="undefined" '="" class="pick-a-color form-control ng-pristine ng-valid"> ionic.bundle.js:17763
(anonymous function) ionic.bundle.js:17763
(anonymous function) ionic.bundle.js:15110
nodeLinkFn ionic.bundle.js:14474
compositeLinkFn ionic.bundle.js:13875
compositeLinkFn ionic.bundle.js:13878
compositeLinkFn ionic.bundle.js:13878
nodeLinkFn ionic.bundle.js:14465
compositeLinkFn ionic.bundle.js:13875
publicLinkFn ionic.bundle.js:13780
boundTranscludeFn ionic.bundle.js:13894
controllersBoundTransclude ionic.bundle.js:14492
ngRepeatAction ionic.bundle.js:28164
$watchCollectionAction ionic.bundle.js:20092
Scope.$digest ionic.bundle.js:20221
Scope.$apply ionic.bundle.js:20486
done ionic.bundle.js:16098
completeRequest ionic.bundle.js:16303
xhr.onreadystatechange ionic.bundle.js:16242
____________________________________________________________

Greetings
Christian

from angular-pick-a-color.

cdjackson avatar cdjackson commented on June 19, 2024

Looking at this line (element.pickAColor...) the error probably means that the 'pickAColor' jquery plugin isn't loaded, or isn't running for some reason. I would put a breakpoint on this line and have a look at 'element' to see if pickAColor is loaded.

One other thing that might be an issue is to make sure that with your <script> tags, that jquery is loaded first (ie before angular.js). I don't think that this is an issue here, but it might cause other problems later so it's worth doing.

Tonight I'll make a quick demo page and will add that to the repo to assist testing.

from angular-pick-a-color.

cschaf avatar cschaf commented on June 19, 2024

I solved it. the position of my jquery include was at the wrong place. Thanks for your support Chris.

Greetings
Christian

from angular-pick-a-color.

cdjackson avatar cdjackson commented on June 19, 2024

No problem - glad it’s working.

from angular-pick-a-color.

Related Issues (3)

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.