codef0rmer/angular-dragdrop

some errors

eniniz opened this issue · 3 comments

I copy past the example of codepen, but I get those errors:

  1. angular-dragdrop.js:414 Uncaught TypeError: Cannot read property 'fn' of undefined
  2. angular.js:13920 TypeError: $ is not a function
    at new (file:///D:/Nouveau%20dossier%20(2)/angular-dragdrop.js:37:5)
    at Object.instantiate (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js:42:56)
    at Object. (https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js:42:352
    ......

me too, when the page load, there exists 'Cannot read property 'fn' of undefined', maybe because the jQuery load to slow to run

@eniniz @Lywangwenbin It's because you haven't loaded jQuery before angular-dragdrop, the package needs jQuery to run.

import 'jquery';
import 'angular-dragdrop';

Hope that helps.

Make sure you have loaded jQuery with window.jQuery.