kaihenzler / angular-minicolors

A wrapper around JQuery MiniColors
http://kaihenzler.github.io/angular-minicolors/
MIT License
75 stars 51 forks source link

o.minicolors is not a function #13

Closed sebastiaanluca closed 9 years ago

sebastiaanluca commented 9 years ago

Just did a default install, but keep getting this error. Seems the minicolors method doesn't exist when it tries to execute it on the element trough element.minicolors(). Did a few debug console logs and it couldn't get past element.minicolors('destroy');

In my view: <input type="text" minicolors ng-model="derp" />

In my controller: $scope.derp = '#FF0000';

Files are loaded in the following order:

  1. Angular, jQuery, etc
  2. jQuery Minicolors
  3. Angular Minicolors directive

Used versions (tried a few):

kaihenzler commented 9 years ago

Hey there, I didn't Test anyrhing But just read The email, You have to load JQuery First And angular afterwards. Angular Uses jqLite if IT doesn't Find JQuery. this might be the Cause of your problem. Could you Test if IT Works if you load JQuery First?

Greetings, Kai

Am 07.02.2015 um 00:28 schrieb Sebastiaan Luca notifications@github.com:

Just did a default install, but keep getting this error. Seems the minicolors method doesn't exist when it tries to execute it on the element trough element.minicolors(). Did a few debug console logs and it couldn't get past element.minicolors('destroy');

In my view:

In my controller: $scope.derp = '#FF0000';

Files are loaded in the following order:

  1. Angular, jQuery, etc
  2. jQuery Minicolors
  3. Angular Minicolors directive

Used versions (tried a few):

jQuery 1.11.2, v2.x.x, etc jquery-minicolors 2.1.7 angular-minicolors 0.0.5 — Reply to this email directly or view it on GitHub.

sebastiaanluca commented 9 years ago

Yeeeep, that was it. Thanks!

Just to notify you, I know have the issue where minicolors deletes the parent of the input div (https://github.com/kaihenzler/angular-minicolors/issues/5), but if I just wrap it in another div, it works.