Several ways, you can either bind it via a service, or expose the method as an output on the child component directly, or maybe get a reference of the child component on the parent and then call the method from child instance, or have an observable passed from parent to child, that the child listens to. Here's that first example:
class ChildComponent {
constructor(private gateService: GateService) {}
ngOnInit() {
this.gateService.openGate$.subscribe((params: any) => this.onGateOpen(params));
}
private onGateOpen(params) {
}
}
class ParentComponent {
constructor(private gateService: GateService) {}
openGate() {
this.gateService.openGate('some param');
}
}
class GateService {
openGate$: Subject<string> = new Subject();
openGate(param) {
this.openGate$.next(param);
}
}
Read more about it all here.