From b587091b6e6a30a2c53d577956866a1e3d1c77ea Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sun, 15 Jan 2012 23:26:06 -0800 Subject: feat(jqLite): added injector() helper method --- src/jqLite.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/jqLite.js') diff --git a/src/jqLite.js b/src/jqLite.js index 1f640740..e7412904 100644 --- a/src/jqLite.js +++ b/src/jqLite.js @@ -59,6 +59,8 @@ * ## In addtion to the above, Angular privides an additional method to both jQuery and jQuery lite: * * - `scope()` - retrieves the current Angular scope of the element. + * - `injector()` - retrieves the Angular injector associated with application that the element is + * part of. * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top * parent element is reached. * @@ -314,6 +316,10 @@ forEach({ return jqLite(element).inheritedData($$scope); }, + injector: function(element) { + return jqLite(element).inheritedData('$injector'); + }, + removeAttr: function(element,name) { element.removeAttribute(name); }, -- cgit v1.2.3