anchor.diff:      td
         :marked
           ### Classes
  +        
  +        ### 类
   
           We put most of our Angular 2 TypeScript code into TypeScript classes.
  +        
  +        我们把绝大多数Angular 2 TypeScript代码放到TypeScript类中。
   
         +makeExample('cb-ts-to-js/ts/app/hero.component.ts', 'class')(format="." )
   
       td
         :marked
           ### Constructors and Prototypes
  +
  +        ### 构造函数和原型
   
           ES5 JavaScript has no classes. We use the constructor
           pattern instead which works with Angular 2 as well as classes do.
  +        
  +        ES5 JavaScript不支持类。取而代之，我们使用构造模式（constructor pattern），和类一样，它可以跟Angular 2一起工作。
   
         +makeExample('cb-ts-to-js/js/app/hero.component.js', 'constructorproto')(format="." )
   
  
positive.code:   code examples to ES5, so that they can be applied to Angular 2 JavaScript
    applications.
    
    
  
  <a id="toc"></a>
  :marked
    ## Table of contents
  
    [Modularity: imports and exports](#modularity)
  
    [Classes and Class Metadata](#class-metadata)
    
    [Input and Output Metadata](#property-metadata)
    
    [Dependency Injection](#dependency-injection)
    
    [Host and Query Metadata](#other-property-metadata)
  
    **Run and compare the live [TypeScript](/resources/live-examples/cb-ts-to-js/ts/plnkr.html) and 
    [JavaScript](/resources/live-examples/cb-ts-to-js/js/plnkr.html) code shown in this cookbook.**
  
  a(id="modularity")
  .l-main-section
  :marked
    ## Importing and Exporting
  
  - var top="vertical-align:top"
  table(width="100%")
  
negative.code:       :marked
          ### Importing Angular 2 Code
  
          ### 导入Angular 2代码
  
          In TypeScript code, Angular 2 classes, functions, and other members
          are imported with TypeScript `import` statements:
          
          在TypeScript代码中，Angular 2是利用TypeScript的`import`声明来导入类、函数和其他成员的。
  
        +makeExample('cb-ts-to-js/ts/app/main.ts', 'ng2import')(format="." )
  
      td
        :marked
          ### Accessing Angular 2 Code through the ng global
          
          ### 通过全局ng来访问Angular 2代码
  
          In JavaScript code, when using
          [the Angular 2 packages](../glossary.html#!#scoped-package),
          we can access Angular code through the global `ng` object. In the
          nested members of this object we'll find everything we would import
          from `angular2` in TypeScript:
          
          在JavaScript代码中，当使用[Angular 2库](../glossary.html#!#scoped-package)时，
          我们可以通过全局的`ng`对象来访问Angular代码。在这个对象嵌套很多成员中，我们能找到所有在TypeScript里面导入的`angular2`
  
        +makeExample('cb-ts-to-js/js/app/main.js', 'ng2import')(format="." )
  
  