forRoot
creates a module that contains all the directives, the given routes, and the router service itself
forRoot
创建一个包含所有指令、给定路由和路由器服务本身的模块
forChild
creates a module that contains all the directives and the given routes, but does not include the router service.
forChild
创建一个包含所有指令和给定路由的模块,但不包括路由器服务。
.forRoot(routes)是父亲,.forChild(routes)是孩子;
一家(一个项目)中只能有一个父亲(forRoot),但可以有多个孩子(forChild)
参考链接:https://blog.csdn.net/i042416/article/details/119002384