What is the purpose of forRoot Method in Angular 4?
In Angular 4, the ForRoot method is used when the module is "eager," not lazy-loaded. Except for lazy modules which loaded on demand with their factory, Angular creates a factory for all other modules. The ForRoot method allows users to access providers from any point in the application that is not lazy loaded. This ultimately will enable users to have different configurations for different load cases.