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

Commit 31ed0af

Browse files
committed
perf($compile): delay object initialization in nodeLinkFn
1 parent 1311271 commit 31ed0af

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/compile.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
14701470

14711471

14721472
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
1473-
var i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;
1473+
var i, ii, linkFn, controller, isolateScope, elementControllers, transcludeFn;
14741474

14751475
var $element = jqLite(linkNode);
14761476
var attrs = (compileNode === linkNode)
@@ -1568,6 +1568,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
15681568
}
15691569
transcludeFn = boundTranscludeFn && controllersBoundTransclude;
15701570
if (controllerDirectives) {
1571+
elementControllers = {};
15711572
forEach(controllerDirectives, function(directive) {
15721573
var locals = {
15731574
$scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,

0 commit comments

Comments
 (0)