From 0d7f19bb620ca4f733e5c202807921501e35172c Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 21 Aug 2013 00:22:40 -0700 Subject: revert: fix($compile): always instantiate controllers... fix($compile): always instantiate controllers in parent->child order This reverts commit 683fd713c41eaf5da8bfbf53b574e0176c18c518. It turns out that there is some existing code that relies on the incorrect timing. Rather than breaking these apps that depend on stable releases, we are going to keep this changeo only in master and the apps will need to migrate to the correc timing during the 1.2 upgrade. --- src/ng/directive/ngTransclude.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/ng/directive/ngTransclude.js b/src/ng/directive/ngTransclude.js index 668f8033..c15b77cb 100644 --- a/src/ng/directive/ngTransclude.js +++ b/src/ng/directive/ngTransclude.js @@ -49,14 +49,9 @@ * */ var ngTranscludeDirective = ngDirective({ - controller: ['$transclude', '$element', '$scope', function($transclude, $element, $scope) { - // use evalAsync so that we don't process transclusion before directives on the parent element even when the - // transclusion replaces the current element. (we can't use priority here because that applies only to compile fns - // and not controllers - $scope.$evalAsync(function() { - $transclude(function(clone) { - $element.append(clone); - }); + controller: ['$transclude', '$element', function($transclude, $element) { + $transclude(function(clone) { + $element.append(clone); }); }] }); -- cgit v1.2.3