anchor.diff:    makes it easy for a module library to enrich the entire application with new services.
     By adding the `HttpModule` once, every application component can make http requests. 
     
  +  设计如此！
  +  通过模块导入来实现可扩展性是Angular模块系统的主要设计目标。
  +  把模块的提供商并入应用程序的注入器可以让库模块使用新的服务来强化应用程序变得更容易。
  +  只要添加一次`HttpModule`，那么应用中的每个组件就都可以发起Http请求了。
  +  
     However, this can feel like an unwelcome surprise if you are expecting the module's services 
     to be visible only to the components declared by that feature module.
     If the `HeroModule` provides the `HeroService` and the root `AppModule` imports `HeroModule`, 
     any class that knows the `HeroService` _type_ can inject that service, 
     not just the classes declared in the `HeroModule`.
  +  
  +  不过，如果你期望模块的服务只对那个特性模块内部声明的组件可见，那么这可能会带来一些不受欢迎的“惊喜”。
  +  如果`HeroModule`提供了一个`HeroService`，并且根模块`AppModule`导入了`HeroModule`，那么任何知道`HeroService`*类型*的类都可能注入该服务，而不仅是在`HeroModule`中声明的那些类。
   
   .l-hr
   
  
positive.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.
  
    When we import a module,
    Angular adds the module's service providers (the contents of its `providers` list)
    to the application _root injector_.
  
    This makes the provider visible to every class in the application that knows the provider's lookup token.
  
    This is by design. 
    Extensibility through module imports is a primary goal of the Angular module system.
  
negative.code: .l-main-section
  :marked
    ### Why is a service provided in a lazy loaded module visible only to that module?
    
    ### 为什么在延迟加载模块中声明的服务提供商只对该模块自身可见？
    
    Unlike providers of the modules loaded at launch, 
    providers of lazy loaded modules are *module-scoped*.
    
    和启动时就加载的模块中的提供商不同，延迟加载模块中的提供商是*局限于模块*的。
  
    When the Angular router lazy-loads a module, it creates a new execution context.
    That [context has its own injector](#q-why-child-injector "Why Angular creates a child injector") which is a direct child of the application injector.
    
    当Angular路由器延迟加载一个模块时，它创建了一个新的运行环境。
    那个环境[拥有自己的注入器](#q-why-child-injector "为什么Angular会创建子注入器")，它是应用注入器的直属子级。
  
    The router adds the lazy module's providers and the providers of its imported modules to this child injector.
    
    路由器把该延迟加载模块的提供商和它导入的模块的提供商添加到这个子注入器中。
  
    These providers are insulated from changes to application providers with the same lookup token.
    When the router creates a component within the lazy loaded context,
    Angular prefers service instances created from these providers to the service instances of the application root injector.
    
    这些提供商被从使用相同令牌查阅到的应用级提供商隔离开。
    当路由器创建延迟加载环境中的组件时，Angular引用的是服务实例。
  
  .l-hr
  a#q-module-provider-duplicates
  