Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 57ee249

Browse files
committed
refactor($compile): change the parameters orders of transclude functions
Change the paramters order so `controllersBoundTransclude` and `boundTranscludeFn` match
1 parent b6f4d4b commit 57ee249

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/ng/compile.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1153,7 +1153,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
11531153
maxPriority, ignoreDirective, previousCompileContext);
11541154
compile.$$addScopeClass($compileNodes);
11551155
var namespace = null;
1156-
return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn, futureParentElement){
1156+
return function publicLinkFn(scope, cloneConnectFn, futureParentElement, transcludeControllers, parentBoundTranscludeFn){
11571157
assertArg(scope, 'scope');
11581158
if (!namespace) {
11591159
namespace = detectNamespaceForChildElements(futureParentElement);
@@ -1317,14 +1317,14 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
13171317

13181318
function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn, elementTransclusion) {
13191319

1320-
var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
1320+
var boundTranscludeFn = function(transcludedScope, cloneFn, futureParentElement, controllers, containingScope) {
13211321

13221322
if (!transcludedScope) {
13231323
transcludedScope = scope.$new(false, containingScope);
13241324
transcludedScope.$$transcluded = true;
13251325
}
13261326

1327-
return transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn, futureParentElement);
1327+
return transcludeFn(transcludedScope, cloneFn, futureParentElement, controllers, previousBoundTranscludeFn);
13281328
};
13291329

13301330
return boundTranscludeFn;
@@ -1965,7 +1965,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
19651965
if (!futureParentElement) {
19661966
futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
19671967
}
1968-
return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
1968+
return boundTranscludeFn(scope, cloneAttachFn, futureParentElement, transcludeControllers, scopeToChild);
19691969
}
19701970
}
19711971
}

src/ng/directive/ngInclude.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ var ngIncludeFillContentDirective = ['$compile',
284284
$compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,
285285
function namespaceAdaptedClone(clone) {
286286
$element.append(clone);
287-
}, undefined, undefined, $element);
287+
}, $element);
288288
return;
289289
}
290290

0 commit comments

Comments
 (0)