I have two methods that emit some parameters.
@Output() parametersEmitter = new EventEmitter<FilterParams>();
emitSearch() {
const parameters = <any>{};
this.parametersEmitter.emit(parameters);
}
emitExport() {
const parameters = <any>{};
this.parametersEmitter.emit(parameters);
}
Then I want to emit those parameters to the Rest API methods. This is what I want to do, but it is not correct to use two times the (parametersEmitter). Any idea of how can I use different methods with the parameterEmitter?
<div>
<app-search (parametersEmitter)="searchMessages($event)" (parametersEmitter)="exportMessages($event)"></app-search>
</div>
searchMessages()
and exportMessages()
are methods that send the parameters to Backend