@input and @output in angular 8 for passing data between 2 modules code example
Example: output event angular
@Component({...})
export class CounterComponent {
@Input()
count: number = 0;
@Output()
change: EventEmitter<number> = new EventEmitter<number>();
increment() {
this.count++;
this.change.emit(this.count);
}
decrement() {
this.count--;
this.change.emit(this.count);
}
// in parent component
//(change)="countChange($event)">
}