diff options
| author | Misko Hevery | 2011-02-07 13:28:42 -0800 |
|---|---|---|
| committer | Misko Hevery | 2011-02-16 00:48:22 -0500 |
| commit | 0a5c00abf8664fdbdc5d16b13adb1989b4531cdf (patch) | |
| tree | 42d9426de8aa7917ba2dc127ee35dbc5890d7877 /docs | |
| parent | a004d487c4bb48b2bec19b60bc5ddc5244029be5 (diff) | |
| download | angular.js-0a5c00abf8664fdbdc5d16b13adb1989b4531cdf.tar.bz2 | |
Add public API to retrieve scope from element.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/angular.element.ngdoc | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/docs/angular.element.ngdoc b/docs/angular.element.ngdoc index a636cc25..90025799 100644 --- a/docs/angular.element.ngdoc +++ b/docs/angular.element.ngdoc @@ -9,16 +9,17 @@ Wraps a raw DOM element or HTML string as [jQuery](http://jquery.com) element. jQuery is loaded or a function that wraps the element or string in angular's jQuery lite implementation. -Real jQuery always takes precedence if it was loaded before angular. +Real jQuery always takes precedence (as long as it was loaded before `DOMContentEvent`) Angular's jQuery lite implementation is a tiny API-compatible subset of jQuery which allows -angular to manipulate DOM. The functions implemented are usually just the basic versions of -them and might not support arguments and invocation styles. +angular to manipulate DOM. The jQuery lite implements only a subset of jQuery api, with the +focus on the most commonly needed functionality and minimal footprint. For this reason only a +limited number of jQuery methods, arguments and invocation styles are supported. NOTE: All element references in angular are always wrapped with jQuery (lite) and are never raw DOM references. -Angular's jQuery lite implements these functions: +## Angular's jQuery lite implements these functions: - [addClass()](http://api.jquery.com/addClass/) - [after()](http://api.jquery.com/after/) @@ -39,5 +40,9 @@ Angular's jQuery lite implements these functions: - [text()](http://api.jquery.com/text/) - [trigger()](http://api.jquery.com/trigger/) +## Additionally these methods are available in both jQuery and jQuery lite version. + +- `scope()` - retrieves the current angular scope of the element. + @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. @returns {Object} jQuery object. |
