在 Angular 中使用 Jquery UI 插件 [英] Using Jquery UI plugin with Angular

查看:29
本文介绍了在 Angular 中使用 Jquery UI 插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 angular 应用程序中使用 jquery 的 UI 布局插件.是否有一个 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?

推荐答案

AngularJS 是为健壮的架构而构建的,这就是为什么我们在指令和其他组件方面看到如此多的模块.将 JQuery 放在它上面就像离开他们的核心设计,你自己最终会在维护代码库时陷入混乱.

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 是您编写 AngularJS 应用程序的拐杖.

如果您正在启动 AngularJS 应用程序,请仔细查看 ng-样板.然后看看ui-bootstrap 的指令.它们是一个活生生的例子,说明您如何使用一小部分代码完成jQuery 事情",并构建一个更易于维护、更易于测试且通常更易于使用的应用.

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.

看看这个东西

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

使用 AngularJS?然后停止使用jQuery

这篇关于在 Angular 中使用 Jquery UI 插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆