Angular · Middle · Question 11 of 75
What does model() create?
export class Rating {
value = model(0);
set(v: number) { this.value.set(v); }
}
// parent: <app-rating [(value)]="rating" />- ✓Correct answer: A writable input signal that supports two-way binding with the parent
- 2A form control that must be used with
ngModel - 3A data model class with validation
Explanation
Writing to a model signal emits a valueChange event, so [(value)] keeps the parent in sync. The parent can bind a plain field or a writable signal.