javascript - Angularjs 和 $ 选择器

标签 javascript jquery angularjs

在 Angularjs Controller 中我有以下功能:

 function colorDropDownEditor(container, options) {
    $('<input data-text-field="Myobject" data-value-field="Referente" data-bind="value:' +    options.field + '"/>')
    .appendTo(container)
 ...
 ...

现在我的问题是:AngularJS如何执行jquery方法?如何解释“$”符号?

谢谢

最佳答案

Angular 包括 jqLite ,它实现了所有 jQuery 功能的子集。

来自Angular FAQ :

Yes, Angular can use jQuery if it's present in your app when the application is being bootstrapped. If jQuery is not present in your script path, Angular falls back to its own implementation of the subset of jQuery that we call jQLite.

关于javascript - Angularjs 和 $ 选择器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24220428/

相关文章:

css - Chrome 设计中的自动完成列表

javascript - 如何组合数据并在 Angular 数据表中显示图像

javascript - socket.io 不良连接容忍度

javascript - 按顺序解析子元素中的 JSON

javascript - 如何从 php 操作更新数据库数量

javascript - 将 jQuery 添加到第 3 方页面失败

javascript - 图片在 iframe 中加载后未从缓存中加载

javascript - Angular ng-repeat获取数组中的对象?

javascript - 为什么它不一次输出所有数组元素?

javascript - 在同步回调函数中等待异步回调函数