anchor.diff:    Next we open `crisis-center.routes.ts `, import the `AuthGuard` class, and
     update the admin route with a `CanActivate` guard property that references it:
   
  -  接下来，我们打开`crisis-center.routes.ts`，导入`AuthGuard`类，，修改管理路由并通过`canActivate`属性来引用`AuthGuard`：
  +  接下来，打开`crisis-center.routes.ts`，导入`AuthGuard`类，修改管理路由并通过`CanActivate`属性来引用`AuthGuard`：
   
   +makeExample('router/ts/app/crisis-center/crisis-center.routes.ts', 'admin-route', 'crisis-center.routes.ts (guarded admin route)')(format=".")
   
  
positive.code:   We did so, for example, in the [HeroDetailComponent](#hero-detail-ctor).
    We might have put the `ngOnInit` logic inside the constructor instead. We didn't for a reason. The reason is *testability*.
  
    我们在很多组件类中实现了`ngOnInit`方法。比如在[HeroDetailComponent](#hero-detail-ctor)中就这么用过。我们也可以把`ngOnInit`中的逻辑放在构造函数中，但我们为了一个理由而没那么做，这个理由就是*可测试性*。
  
    A constructor that has major side-effects can be difficult to test because it starts doing things as soon as
    we create a test instance. In this case, it might have made a request to a remote server, something it shouldn't
    do under test. It may even be impossible to reach the server in the test environment.
  
    有显著副作用的构造函数很难测试，因为它在创建测试实例时就靠开始做事了。这种情况下，它可能已经向远程服务器发起了请求，但有些事情在测试时没法做。甚至在测试环境下访问服务器都是不可能的。
  
    The better practice is to limit what the constructor can do. Mostly it should stash parameters in
    local variables and perform simple instance configuration.
  
negative.code:   Please visit the [live example](/resources/live-examples/router/ts/plnkr.html) and
    where you can download the final source code.
  
    本章中涉及到了很多背景知识，而且本应用程序也太大了，所以没法在这里显示。请访问[在线例子](/resources/live-examples/router/ts/plnkr.html)，在那里你可以下载最终的源码。
  
  .l-main-section
  
  