Skip to content

Commit e5ecfc0

Browse files
author
Joe Grund
committed
Fixes #106
Remove clearWatcher on any segments that get set to null so they don't remain in the $rootScope.$$watchers list.
1 parent e1aed89 commit e5ecfc0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/route-segment.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@ mod.provider( '$routeSegment',
264264
for(var j = updates[i].index + 1; j < $routeSegment.chain.length; j++) {
265265

266266
if($routeSegment.chain[j]) {
267+
if ($routeSegment.chain[j].clearWatcher) {
268+
$routeSegment.chain[j].clearWatcher();
269+
}
270+
267271
$routeSegment.chain[j] = null;
268272
updateSegment(j, null);
269273
}

0 commit comments

Comments
 (0)