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

Commit

Permalink
perf($compile): delay object initialization in nodeLinkFn
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar committed Aug 17, 2014
1 parent 1311271 commit 31ed0af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ng/compile.js
Expand Up @@ -1470,7 +1470,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {


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

var $element = jqLite(linkNode);
var attrs = (compileNode === linkNode)
Expand Down Expand Up @@ -1568,6 +1568,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
}
transcludeFn = boundTranscludeFn && controllersBoundTransclude;
if (controllerDirectives) {
elementControllers = {};
forEach(controllerDirectives, function(directive) {
var locals = {
$scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,
Expand Down

0 comments on commit 31ed0af

Please sign in to comment.