input()
noun
say it: “IN-put” /ˈɪnpʊt/
A value a parent component passes into a child component, declared with input().
What does input() do?
input() declares a value that a parent component can pass in, like an HTML attribute. It returns a signal you read by calling it.
export class ProductCard {
product = input.required<Product>();
}
// parent template: <app-product-card [product]="shoe" />
In a sentence
- “The card declares product = input<Product>(), and the list passes each product in.”
Level: Apprentice · More Angular terms at this level
Updated