anchor.diff:  .l-main-section
   :marked
     ## Inject into a derived class
  +  ## 注入一个衍生类
  +  
     We must take care when writing a component that inherits from another component.
     If the base component has injected dependencies, 
     we must re-provide and re-inject them in the derived class
     and then pass them down to the base class through the constructor.
     
  +  当编写一个从另一个组件衍生的组件的时候，我们要格外小心。如果基础组件有注入的依赖，我们必须要在衍生类中重新提供和重新注入它们，并且将他们通过构造函数传给基本类。
  +  
     In this contrived example, `SortedHeroesComponent` inherits from `HeroesBaseComponent` 
     to display a *sorted* list of heroes.
  +  
  +  在这个人为的例子里，`SortedHeroesComponent`从`HeroesBaseComponent`衍生，显示一个*被排序*的英雄列表。
     
   figure.image-display
     img(src="/resources/images/cookbooks/dependency-injection/sorted-heroes.png" alt="Sorted Heroes")
  
positive.code:   But Angular calls the *derived* class's `ngOnInit` *before* calling the base class's `ngOnInit` 
    so we'd be sorting the heroes array *before they arrived*. That produces a nasty error.
    
    Overriding the base class's `_afterGetHeroes` method solves the problem
    
    These complications argue for *avoiding component inheritance*. 
  
  a(id="find-parent")
  .l-main-section
  :marked
    ## Find a parent component by injection
    
    Application components often need to share information.
    We prefer the more loosely coupled techniques such as data binding and service sharing.
    But sometimes it makes sense for one component to have a direct reference to another component
    perhaps to access values or call methods on that component.
     
    Obtaining a component reference is a bit tricky in Angular.
    Although an Angular application is a tree of components,
  
negative.code:     This rule makes the component safe to construct under test without fear that it will do something dramatic like talk to the server.
      That's why we call the `HeroService` from within the `ngOnInit` rather than the constructor.
      
      我们强烈的推荐简单的结构函数。它们应该只用来初始化变量。这个规则让组件在测试环境中被安全的构造，免除他可能要去做一些非常戏剧化的动作（比如连接服务）的担心。
      这就是为什么我们在`ngOnInit`里面调用`HeroService`，而不是在构造函数中。
      
      We explain the mysterious `_afterGetHeroes` below.
      
      我们在下面解释这个神秘的`_afterGetHeroes`。
  :marked
    Users want to see the heroes in alphabetical order.
    Rather than modify the original component, we sub-class it and create a
  