Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Jquery UI plugin with Angular

I wanted to use the jquery's UI layout plugin in an angular application. Is there an angular directive that does this already, or serves the same purpose?

like image 495
32teeths Avatar asked Apr 14 '14 06:04

32teeths


People also ask

Can we use jQuery plugin in Angular?

We then need to implement ngOnInit Lifecycle Hook which can be imported from Angular Core. We can write jQuery code inside the method ngOnInit, To add the action to the button we created in app. component. html, we add a button.

Is jQuery UI obsolete?

jQuery UI position has been replaced with Popper. js.

Is jQuery UI still supported?

Support for jQuery 1.7 has been dropped; jQuery 1.8 & newer remain supported. In this release, all individual module files as well as bundled jQuery UI copies produced by the Download Builder have all its code running in strict mode.


1 Answers

AngularJS is here to be built for robust arhitecture and that is why we see so many modules in terms of directives and other components. Putting JQuery with it will be like going away from their core design and you will yourself end up in a mess maintaining the codebase.

jQuery is a crutch if you are writing AngularJS applications.

If you’re starting an AngularJS app, take a good look at ng-boilerplate. Then take a look at ui-bootstrap’s directives. They are a living example of how you can do “jQuery things” with a fraction of the code, and build an app that is easier to maintain, way more testable, and generally nicer to work with.

Take a look at this stuff

  • How do I “think in AngularJS” if I have a jQuery background? - An excellent Stack Overflow post that expands on this viewpoint

  • Using AngularJS? Then stop using jQuery

like image 123
Nidhish Krishnan Avatar answered Oct 27 '22 00:10

Nidhish Krishnan