How do signal inputs, outputs and model() work?

Angular signals and change detection · Freshers and experienced

Model answer

input() declares a read-only signal input, with input.required() when the parent must supply it. output() declares an event emitter. model() creates a signal that supports two-way binding, so a parent can write [(value)]="parentSignal".

Because inputs are signals, you can use them in computed values and effects, and they work well with the new change detection model. They replace the @Input and @Output decorators for new code.

Learn this topic

Angular Tutorial: Beginner to Advanced .

Sign in to add your own answer.

More questions