Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The forRoot() method is a static method used in Angular NgModule to configure and provide the dependencies needed for the root module of an application. It allows us to configure services, directives, pipes, and other application-wide providers that will be used throughout the entire application. This method is typically used in the app.module.ts file and should only be imported once in the application.