Content projection is an important part of Angular. However, it has never been documented in the Angular documentation set. This topic attempts to provide the basics of content projection for developers. It is not a comprehensive guide; rather, it is a starting point that we can hopefully expand upon in the future. PR Close #41143
11 lines
213 B
TypeScript
11 lines
213 B
TypeScript
import { Component } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-zippy-basic',
|
|
template: `
|
|
<h2>Single-slot content projection</h2>
|
|
<ng-content></ng-content>
|
|
`
|
|
})
|
|
export class ZippyBasicComponent {}
|