Answer the question
In order to leave comments, you need to log in
How to intercept an event from another Angular 8 component?
Good afternoon!
I am learning Angular and faced such a problem - there is a search-bar component in my project, which has a tag and when you enter text into this field, an event is generated:
<input type="text" (input)="search($event)">
...
@Output()
input: EventEmitter<any>;
...
search(event): void
{
this.input.emit(event.target.value);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question