I am new to angular2
I have a button in parent component, if
This can be achieved by the following way as well:
.html
.ts
activatedComponentReference:any
onActivate(activatedComponentReference) {
this.activatedComponentReference = activatedComponentReference;
}
onBtnClick() {
const childRouteComp = this.activatedComponentReference as ChildRouteComponent;
childRouteComp.childFunction();
}