• 与 vue 中的插槽类似 ```typescript // src/app/app.component.html
      app works

    a
    b

    1. ```typescript
    2. // src/app/hello/hello.component.html
    3. <div>hello works</div>
    4. <div>
    5. <ng-content select=".a"></ng-content>
    6. </div>
    7. <div>
    8. <ng-content select=".b"></ng-content>
    9. </div>
    • 如果只有一个 ng-content,不需要 select 属性
    • ng-content 在浏览器中会被
      替代,如果不想要这个额外的div,可以使用 ng-container 替代这个div ```typescript // src/app/app.component.html
      app works

    a b ```