The input
function allows declaration of Angular inputs in directives
and components.
There are two variants of inputs that can be declared:
- Optional inputs with an initial value.
- Required inputs that consumers need to set.
By default, the input
function will declare optional inputs that
always have an initial value. Required inputs can be declared
using the input.required()
function.
Inputs are signals. The values of an input are exposed as a Signal
.
The signal always holds the latest value of the input that is bound
from the parent.
API
Usage Notes
Jump to details