diff options
Diffstat (limited to 'src/ngRoute/directive/ngView.js')
| -rw-r--r-- | src/ngRoute/directive/ngView.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ngRoute/directive/ngView.js b/src/ngRoute/directive/ngView.js index a8a136df..3271ac0c 100644 --- a/src/ngRoute/directive/ngView.js +++ b/src/ngRoute/directive/ngView.js @@ -173,8 +173,7 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller, terminal: true, priority: 400, transclude: 'element', - compile: function(element, attr, linker) { - return function(scope, $element, attr) { + link: function(scope, $element, attr, ctrl, $transclude) { var currentScope, currentElement, autoScrollExp = attr.autoscroll, @@ -200,7 +199,7 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller, if (template) { var newScope = scope.$new(); - linker(newScope, function(clone) { + $transclude(newScope, function(clone) { clone.html(template); $animate.enter(clone, null, currentElement || $element, function onNgViewEnter () { if (angular.isDefined(autoScrollExp) @@ -235,7 +234,6 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller, cleanupLastView(); } } - }; } }; } |
