mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
17 lines
348 B
TypeScript
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;
|
|
}
|