anchor.diff:  .l-main-section
   :marked
     ### What is the _forRoot_ method?
  +  
  +  ### *forRoot*方法是什么？
   
     The `forRoot` static method is a convention that makes it easy for developers to configure the module's provider(s).
  +  
  +  静态方法`forRoot`是一个约定，它可以让开发人员更轻松的配置模块的提供商。
     
     The `RouterModule.forRoot` method is a good example. 
     Apps pass a `Routes` object to `RouterModule.forRoot` in order to configure the app-wide `Router` service with routes. 
     `RouterModule.forRoot` returns a [ModuleWithProviders](../api/core/index/ModuleWithProviders-interface.html). 
     We add that result to the `imports` list of the root `AppModule`.
  +  
  +  `RouterModule.forRoot`就是一个很好的例子。
  +  应用把一个`Routes`对象传给`RouterModule.forRoot`，为的就是使用路由配置全应用级的`Router`服务。
  +  `RouterModule.forRoot`返回一个[ModuleWithProviders](../api/core/index/ModuleWithProviders-interface.html)对象。
  +  我们把这个结果添加到根模块`AppModule`的`imports`列表中。
   
   .alert.is-important
     :marked
       Only call and import a `.forRoot` result in the root application module, `AppModule`.
       Importing it in any other module, particularly in a lazy loaded module,
       is contrary to the intent and is likely to produce a runtime error.
  +    
  +    只能在应用的根模块`AppModule`中调用并导入`.forRoot`的结果。
  +    在其它模块中导入它，特别是延迟加载模块中，是违反设计目标的并会导致一个运行时错误。
  +    
   :marked
     `RouterModule` also offers a `forChild` static method for configuring the routes of lazy loaded modules.
  +  
  +  `RouterModule`也提供了静态方法`forChild`，用于配置延迟加载模块的路由。
   
     **_forRoot_** and **_forChild_** are conventional names for methods that
     configure services in root and feature modules respectively.
     
  +  ***forRoot***和***forChild***都是方法的约定名称，它们分别用于在根模块和特性模块中配置服务。
  +  
     Angular doesn't recognize these names but Angular developers do.
     Follow this convention when you write similar modules with configurable service providers.
  +  
  +  Angular无法识别这些名字，但是Angular的开发人员可以。
  +  当你写类似的需要可配置的服务提供商时，请遵循这个约定。
   
   .l-hr
   
  
positive.code: .l-main-section
  :marked
    ### Can I re-export classes and modules?
  
    Absolutely!
  
    Modules are a great way to selectively aggregate classes from other modules and
    re-export them in a consolidated, convenience module.
  
    A module can re-export entire modules which effectively re-exports all of their exported classes.
    Angular's own `BrowserModule` exports a couple of modules like this:
  code-example.
    exports: [CommonModule, ApplicationModule]
  
  :marked
    A module can export a combination of its own declarations, selected imported classes, and imported modules.
  .l-sub-section
    :marked
      Don't bother re-exporting pure service modules.
      Pure service modules don't export [declarable](#q-declarable) classes that another module could use.
      For example, there is no point in re-exporting `HttpModule` because it doesn't export anything.
      It's only purpose is to add http service providers to the application as a whole.
  
  .l-hr
  
  
negative.code: .l-main-section
  :marked
    ### Why is a service provided in a feature module visible everywhere?
    
    ### 为什么服务提供商在特性模块中的任何地方都是可见的？
  
    Providers listed in the `@NgModule.providers` of a bootstrapped module have **application scope**.
    Adding a service provider to `@NgModule.providers` effectively publishes the service to the entire application.
    
    列在引导模块的`@NgModule.providers`中的服务提供商具有**全应用级作用域**。
    往`NgModule.providers`中添加服务提供商将导致该服务被发布到整个应用中。
  
    When we import a module,
    Angular adds the module's service providers (the contents of its `providers` list)
    to the application _root injector_.
    
    当我们导入一个模块时，Angular就会把该模块的服务提供商（也就是它的`providers`列表中的内容）加入该应用的*根注入器*中。
  
    This makes the provider visible to every class in the application that knows the provider's lookup token.
    
    这会让该提供商对应用中所有知道该提供商令牌（token）的类都可见。
  
    This is by design. 
    Extensibility through module imports is a primary goal of the Angular module system.
  