Open oneillci opened 9 years ago
I forgot to add: in my scenario, although the application will have a lot of views, there will only be one active view per module. Each view would be made of several components though
+1, something like the sticky concept on ui-router-extras http://christopherthielen.github.io/ui-router-extras/example/sticky/index.html#/inv/stores
Or ionic navigation http://ionicframework.com/docs/api/directive/ionNavView/
+1 for this use-case. I asked about this during the Q&A at ng-conf.
+1, we'll need this if we're ever going to migrate to the new router.
+1 for this use case.
+1
+1
+1
+1
I have a question regarding the router and/or the page lifecycle.
I have a current Silverlight application that has multiple top level modules (think tabs). Each module contains it's own region and consists of a large set of business screens (30+ screens per module). Each module has a landing page with a menu as an entry point to the screens for that module.
Using these module regions we can have multiple 'active' views in the app at any one time, as switching between modules doesn't actually close an open form. Navigating back to any form presents the data in the same state it was left in. This allows me to navigate away from an open, dirty form with data in a potentially invalid state to another module without triggering a dirty validation message. Navigating back to the original module presents whichever view was most recently active in the state it was last left in.
Is multiple active pages (on different routes) a scenario can be handled with the current router or page life cycle implementation? Maybe I would need some method of persisting the current state of a viewmodel for a screen that perhaps falls outside the traditional activate and deactivate events?
Perhaps there could be additional hooks into the lifecycle that listen to navigation events and respond differently to different to different navigation types: modifying URL manually triggers dirty check, clicking in-app back button triggers dirty check, changing module does not etc.)
The attached images approximate what I'm attempting to say. http://myapp/module1/view-1 is in a dirty state, but I can still navigate to module 2 and create/destroy any of the views in module 2. Navigating back to module 1 shows view-1 in the dirty state it was left in.
This is a feature that will be supported by the Aurelia router AFAIK, and I think it would add real value for large apps.