Understanding forRoot() and forChild() methods


#1

I have not understood yet these router methods, but I think I did it a little more. So, I think that:

  • forRoot() is used globally in the application - may be used for every route in every module.
  • forChild() is used in feature modules to set “the root” routing directory, for example, if we have feature module “Home”, when we use forChild(), all routes from configuration are located in “…/Home/” routing directory.

Am I right or not?