OasisDigital / angular-enterprise-example

Scalable / Large Angular application structure example
MIT License
125 stars 47 forks source link

Lazy loading of modules that use ngrx/store #3

Closed kylecordes closed 6 years ago

kylecordes commented 7 years ago

The example project already uses Store for two different modules that are managed separately and don't depend on each other. An application (in this example, "admin") can statically compose the state for the modules, and make them share the same Store. It works well, but it does not allow lazy loading.

This is because some machinery is necessary in the Store itself to make it possible to dynamically compose reducers in the store as lazy loading occurs.

There is work underway now (April 2017) to enhance Store with this feature. Once that ships, hopefully in May, this example could be updated to use it.

kylecordes commented 6 years ago

This is done. It is much easier now than it was back when this initial effort started in early 2017.