style($compile): clarify argument name

This commit is contained in:
Igor Minar 2012-12-03 20:03:24 +01:00
parent 1e99ea6a51
commit 8f8510fc22

View file

@ -579,11 +579,11 @@ function $CompileProvider($provide) {
* @param {Object} templateAttrs The shared attribute function * @param {Object} templateAttrs The shared attribute function
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
* scope argument is auto-generated to the new child of the transcluded parent scope. * scope argument is auto-generated to the new child of the transcluded parent scope.
* @param {DOMElement} $rootElement If we are working on the root of the compile tree then this * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
* argument has the root jqLite array so that we can replace widgets on it. * argument has the root jqLite array so that we can replace nodes on it.
* @returns linkFn * @returns linkFn
*/ */
function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, $rootElement) { function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, jqCollection) {
var terminalPriority = -Number.MAX_VALUE, var terminalPriority = -Number.MAX_VALUE,
preLinkFns = [], preLinkFns = [],
postLinkFns = [], postLinkFns = [],
@ -637,7 +637,7 @@ function $CompileProvider($provide) {
$compileNode = templateAttrs.$$element = $compileNode = templateAttrs.$$element =
jqLite(document.createComment(' ' + directiveName + ': ' + templateAttrs[directiveName] + ' ')); jqLite(document.createComment(' ' + directiveName + ': ' + templateAttrs[directiveName] + ' '));
compileNode = $compileNode[0]; compileNode = $compileNode[0];
replaceWith($rootElement, jqLite($template[0]), compileNode); replaceWith(jqCollection, jqLite($template[0]), compileNode);
childTranscludeFn = compile($template, transcludeFn, terminalPriority); childTranscludeFn = compile($template, transcludeFn, terminalPriority);
} else { } else {
$template = jqLite(JQLiteClone(compileNode)).contents(); $template = jqLite(JQLiteClone(compileNode)).contents();
@ -661,7 +661,7 @@ function $CompileProvider($provide) {
throw new Error(MULTI_ROOT_TEMPLATE_ERROR + directiveValue); throw new Error(MULTI_ROOT_TEMPLATE_ERROR + directiveValue);
} }
replaceWith($rootElement, $compileNode, compileNode); replaceWith(jqCollection, $compileNode, compileNode);
var newTemplateAttrs = {$attr: {}}; var newTemplateAttrs = {$attr: {}};
@ -689,7 +689,7 @@ function $CompileProvider($provide) {
assertNoDuplicate('template', templateDirective, directive, $compileNode); assertNoDuplicate('template', templateDirective, directive, $compileNode);
templateDirective = directive; templateDirective = directive;
nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i),
nodeLinkFn, $compileNode, templateAttrs, $rootElement, directive.replace, nodeLinkFn, $compileNode, templateAttrs, jqCollection, directive.replace,
childTranscludeFn); childTranscludeFn);
ii = directives.length; ii = directives.length;
} else if (directive.compile) { } else if (directive.compile) {