mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-06 17:21:33 +08:00
fix(jqLite): use jQuery only if jQuery.fn.on present
Make Angular not bind to jQuery versions older than 1.7 since older versions of jQuery do not support necessary on()/off() methods.
This commit is contained in:
committed by
Michał Gołębiowski
parent
5319621afd
commit
fafcd6285a
@@ -1332,8 +1332,9 @@ function snake_case(name, separator){
|
||||
function bindJQuery() {
|
||||
// bind to jQuery if present;
|
||||
jQuery = window.jQuery;
|
||||
// reset to jQuery or default to us.
|
||||
if (jQuery) {
|
||||
// Use jQuery if it exists with proper functionality, otherwise default to us.
|
||||
// Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.
|
||||
if (jQuery && jQuery.fn.on) {
|
||||
jqLite = jQuery;
|
||||
extend(jQuery.fn, {
|
||||
scope: JQLitePrototype.scope,
|
||||
|
||||
Reference in New Issue
Block a user