diff options
| author | Matias Niemelä | 2013-10-17 14:29:06 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-10-23 10:30:45 -0700 |
| commit | 3f568b22f9bec09192588e3cae937db5c2e757f9 (patch) | |
| tree | 12f4bd625dab9280402051d366cbf5837a50ee23 /src | |
| parent | 2623de1426219dc799f63a3d155911f93fc03461 (diff) | |
| download | angular.js-3f568b22f9bec09192588e3cae937db5c2e757f9.tar.bz2 | |
fix(ngView): ensure the new view element is placed after the old view element
Closes #4362
Diffstat (limited to 'src')
| -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; |
