Ask Your Question
3

What function does forRoot serve in NgModule?

asked 2023-07-21 02:57:20 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-07-21 03:13:02 +0000

qstack gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-21 02:57:20 +0000

Seen: 11 times

Last updated: Jul 21 '23