Angular · Junior · Question 66 of 75
How do you emit a value from a component declared with output()?
saved = output<User>();
save() {
this.saved.emit(this.user());
}- ✓Correct answer: Call
.emit(value)on the output - 2Assign the value to
this.saved - 3Return the value from the method
Explanation
The parent listens with (saved)="onSaved($event)", where $event is the emitted value.