简体   繁体   中英

AngularJS and jquery-ui

I have tried to compbine angularJS and jquery-ui the last hours but with no success. I have created the real simple example at fiddle:

My Fiddle example

var myApp = angular.module('myApp', ['ui']);

The problem is the 'ui' dependency injection but I don't know how to solve this issue. I would need jquery-ui necessarily because of reordering table rows.

Thanks a lot for help!

jQuery UI is not an Angular module/dependancy. Therefore, trying to inject it through DI is not going to work. However the inclusion of the script tag for the jQuery UI does include it into your global scope to use.

Your syntax, however, is correct if you are going to use ui-router or ngAnimate .

If you are looking for a sortable table solution for angular you can look into a few resources all which can be injected via the aforementioned syntax:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM