angular/angular.js — Issue #778: Don't re-render my view when it hasn't changed much
Author: nickretallack
Created: 2012-03-09 19:28:36+00:00
State: open

Angular needlessly re-renders views every time it follows a new route, even if the controller and view it routes to are the same. Even if all of the data in the controller is the same as it used to be too.

ng:switch is smart enough to not re-render everything if the condition it cares about hasn't changed. It would be nice if ng:view were so smart.

The main reason this bothers me is that, if the user is scrolled down when they manipulate a view and it re-loads, it jumps them up to the top again. They are likely to lose their place. I'd rather the data seemlessly changed. I could accomplish this by just changing the data and not using $route at all, but then I wouldn't be able to reflect the changes in the URL.