One of the functions in my child component is as follows:
reload() {
clearInterval(this.points);
this.initiateInterval();
this.redrawImages();
}
This function redraws a few images on the window.resize
event.
Now, in the parent component, I have a button called menu-burger
which minimizes the window. I want to link this button to the reload()
function in the child component.
Here is the button code from the parent component:
<button class="collapseMenuIcon" (click)="toggleMenu()">
I tried searching for similar queries on Stack Overflow, but couldn't find one that fits my scenario - mainly because the reload
function is heavily dependent on elements in the child component.
Furthermore, several solutions from previous questions are outdated due to frequent changes in Angular2.
Thank you in advance, I appreciate any help and will upvote all answers.