1.

What is the use of forRoot Method in Angular?

Answer»

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.



Discussion

No Comment Found