Shared controler


I have a rather complex page that contains multiple repeats.

=> products shown in a list
=> products shown as image gallery
=> grouped view on products
=> selection page

User can select the view, data from controller are not reload for performance reasons.

My original setup was to put all repeats in one page and display or hide them with ng-if was needed.
Basically this structure works but i’m running into problems with the collection-repeat.

As i’ve around 10.000 products, ng-repeat is not really an option.
Having multiple collection-repeats in page seems to me several problems in different setups :
=> errors on height when switching between views
=> problem scrolling to bottom

If i change all collection-repeats to ng-repair my page run without problems

I played around with the ion-content, ion-scroll for several days but none was stable enough.

So I gave up and decided to try a different approach.
Each repeat in a different page and route to the right page.
As my data is common, in my app.js i defined the same controller for every page.

To avoid reloading the products every time, my pages are cached.

My first page is working fine, but when i switch pages the data are not are available.

I hope anyone can help me because i ran out of options to keep my performance and functionality.