docs($compile): fix param name and improve example variable name

Closes #5310
This commit is contained in:
Kindy Lin 2013-12-07 00:00:04 +08:00 committed by Pete Bacon Darwin
parent 3dc18037e8
commit 30252a0504

View file

@ -469,14 +469,14 @@
* example would not point to the clone, but rather to the original template that was cloned. In * example would not point to the clone, but rather to the original template that was cloned. In
* this case, you can access the clone via the cloneAttachFn: * this case, you can access the clone via the cloneAttachFn:
* <pre> * <pre>
* var templateHTML = angular.element('<p>{{total}}</p>'), * var templateElement = angular.element('<p>{{total}}</p>'),
* scope = ....; * scope = ....;
* *
* var clonedElement = $compile(templateHTML)(scope, function(clonedElement, scope) { * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
* //attach the clone to DOM document at the right place * //attach the clone to DOM document at the right place
* }); * });
* *
* //now we have reference to the cloned DOM via `clone` * //now we have reference to the cloned DOM via `clonedElement`
* </pre> * </pre>
* *
* *
@ -865,7 +865,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
* @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
* the rootElement must be set the jqLite collection of the compile root. This is * the rootElement must be set the jqLite collection of the compile root. This is
* needed so that the jqLite collection items can be replaced with widgets. * needed so that the jqLite collection items can be replaced with widgets.
* @param {number=} max directive priority * @param {number=} maxPriority Max directive priority.
* @returns {?function} A composite linking function of all of the matched directives or null. * @returns {?function} A composite linking function of all of the matched directives or null.
*/ */
function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,