From 496e6bf9016d33a7cf2f4730d06a8655f01ca5cb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sat, 12 Feb 2011 10:12:10 -0800 Subject: refactored quickClone to cloneNode and exposed it on jQuery --- docs/angular.element.ngdoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/angular.element.ngdoc') diff --git a/docs/angular.element.ngdoc b/docs/angular.element.ngdoc index 90025799..83680d1f 100644 --- a/docs/angular.element.ngdoc +++ b/docs/angular.element.ngdoc @@ -40,9 +40,14 @@ raw DOM references. - [text()](http://api.jquery.com/text/) - [trigger()](http://api.jquery.com/trigger/) -## Additionally these methods are available in both jQuery and jQuery lite version. +## Additionally these methods extend the jQuery and are available in both jQuery and jQuery lite +version: - `scope()` - retrieves the current angular scope of the element. +- `cloneNode()` - Clones the current node, ensuring identical structure. This is important since + the `clone()` method implemented by jQuery under some circumstances changes the DOM + structure, which then prevents proper application of compiled template to the cloned node. + __Always use `cloneNode()` when cloning previously compiled templates.__ @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery. @returns {Object} jQuery object. -- cgit v1.2.3