From 0a5c00abf8664fdbdc5d16b13adb1989b4531cdf Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 7 Feb 2011 13:28:42 -0800 Subject: Add public API to retrieve scope from element. --- src/Angular.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Angular.js') diff --git a/src/Angular.js b/src/Angular.js index b856aa24..9a1ab4a2 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1032,5 +1032,12 @@ function angularJsConfig(document, config) { function bindJQuery(){ // bind to jQuery if present; jQuery = window.jQuery; - angular.element = jqLite = jQuery || jqLiteWrap; + // reset to jQuery or default to us. + if (window.jQuery) { + jqLite = window.jQuery; + jqLite.fn.scope = JQLite.prototype.scope; + } else { + jqLite = jqLiteWrap; + } + angular.element = jqLite; } -- cgit v1.2.3