I am reviewing how the ngrx is implemented in the example app on GH. Can someone please explain why there are two modules in one file at the link below? What reasoning the developer had to have two modules in place of one?
Github link - auth module in ngrx library example app
edit - the same functionality could be implemented with one module itself. why create two modules? what's the functionality split here?
edit-2 - I found the reason for two modules for Auth. The developer needs to export the services such as auth service and auth Guard for use by app module and other modules. For that he created the AuthModule which has forRoot static method for exporting the services.
The other RootAuthModule has the components for html form for getting user input and dispatching the action for authentication. This module is lazy loaded and need not export any components or any services for use by other modules.