angular/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts
Matthieu Riegler 3e0e6ed60f docs: update Dynamic Component loader docs to rely on ngComponentOutlet (#49915)
With #51148, the `ngComponentOutlet` directive now supports inputs.
This allows a less verbose and simpler API to instantiate components dynamicaly.

Fixes #49875

PR Close #49915
2023-09-07 10:03:22 -07:00

17 lines
348 B
TypeScript

/* eslint-disable @angular-eslint/no-input-rename */
// #docregion
import { Component, Input } from '@angular/core';
@Component({
standalone: true,
template: `
<div class="job-ad">
<h4>{{ headline }}</h4>
{{ body }}
</div>
`,
})
export class HeroJobAdComponent {
@Input() headline!: string;
@Input() body!: string;
}