diff options
Diffstat (limited to 'src/ngRoute/directive/ngView.js')
| -rw-r--r-- | src/ngRoute/directive/ngView.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ngRoute/directive/ngView.js b/src/ngRoute/directive/ngView.js index ab1327d0..3a296b5b 100644 --- a/src/ngRoute/directive/ngView.js +++ b/src/ngRoute/directive/ngView.js @@ -207,10 +207,10 @@ function ngViewFactory( $route, $anchorScroll, $compile, $controller, if (template) { var newScope = scope.$new(); linker(newScope, function(clone) { - cleanupLastView(); - clone.html(template); - $animate.enter(clone, null, $element); + $animate.enter(clone, null, currentElement || $element); + + cleanupLastView(); var link = $compile(clone.contents()), current = $route.current; |
