-
Notifications
You must be signed in to change notification settings - Fork 441
Not working with jqLite properly #450
Comments
Hi there. |
Hi, You are logging the message and returning. That's why the functionality will not work. Suggestion to resolve this: Check if jquery is present and if element is not Jquery object then wrap it in Jquery. Hope I am able to make sense on this. |
Oh, needed a second read on this. |
Moreover, as discussed in other issues I would discourage any approach where |
We are loading Jquery before Angular but forcing it to use jqLite using ngJq tag. |
Despite of that, we still need to have angular to use jquery so that Note that the ngJq tag was initially created for those that use Angular behavior.Thodoris Greasidis |
Here is a proof of concept branch and a proof of concept codepen example that would need a lot of testing. |
Same issue 👎 I am facing a problem in using this with jqLite. Checked that element is jQuery instance or not : |
Have you tried loading jQuery before angularjs, as demonstrated in all the provided examples? Is that so big change for your app? |
@thgreasi I have tried to load jQuery before angularjs but same problem :( |
What's the order of the actual <script> tags on the final HTML (if they actually get emitted)? I don't know what packager you are using in your app, but you might have to configure it to treat jQuery as a dependency of angular, to force loading it earlier. That's what I had to do in the requirejs example found in README. |
I am using AngularJS Starter repo for Angular + ES6 + (Webpack or JSPM) |
Any help |
Please take a look at #478 and webpack's module shimming and keep in mind that jquery should be imported before angularjs in your entry point module. I would also prefer to move this discussion over to #478. |
Not working, Why i have to use jquery if i am using angular. I thing this wrong library to use in angular project. I have to use another option or have to build own. |
I am facing a problem in using this with jqLite.
It throws an error message as "'ui.sortable: jQuery should be included before AngularJS!'".
For resolving this, I just followed these steps:
element = $(element);
if ((!angular.element.fn || !angular.element.fn.jquery) && !(element instanceof jQuery)) {
$log.error('ui.sortable: jQuery should be included before AngularJS!');
return;
}
The text was updated successfully, but these errors were encountered: