Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 401 Bytes

projection.md

File metadata and controls

18 lines (14 loc) · 401 Bytes

Projection

Components by default support projection. You can use the ngContent directive to place the projected content in your template.

import {Component, Input} from '@angular/core';

@Component({
  selector: 'child',
  template: `
    <h4>Child Component</h4>
    <ng-content></ng-content>
  `
})
class Child {}

View Example