What is the use of forRoot Method in Angular?
In Angular 4, the ForRoot method is used when the module is "eager," not lazy-loaded. Except for lazy modules that 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.