SPEED & PERFORMANCE
Angular 2 is dramatically faster than Angular 1 with support for fast initial loads through server-side pre-rendering, offline compile for fast startup, and ultrafast change detection and view caching for smooth virtual scrolling and snappy view transitions.
The features look great, but a normal requirement is that when I navigate from ListComponent
to ViewComponent
, I want keep the ListComponent
cached so when I click back from ViewComponent
, the ListComponent
doesn't need to rerender(ListComponent
often gets AJAX data from page 2,3, etc. I know I can keep the data in a service and store the scrollPosition
when I click back, but it will rerender the data again. I really think caching it is a better way.
I implement CanReuse
, but it dosn't work, it only works when navigating between ViewComponents
. So., I want know how the ListComponent
to ViewComponent
caching can work.