From b9001e914740ea0e3bba357a33ddaf13610c874f Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Wed, 30 Nov 2011 20:12:42 -0800 Subject: fix(route): $destroy scope after update and reload When we update route (changing only search param, no route reload) and then reload (change to different route), it did not $destroy last scope. --- src/service/route.js | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/service/route.js b/src/service/route.js index 97c9cee0..77d94e9c 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -258,6 +258,7 @@ function $RouteProvider(){ if (next && last && next.$route === last.$route && equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) { + next.scope = last.scope; $route.current = next; copy(next.params, $routeParams); last.scope && last.scope.$emit('$routeUpdate'); -- cgit v1.2.3