In my file structure, I have: 1. a topbar folder - with html(1) and ts(1) for the topbar 2. a page folder - containing html(2) and ts(2) for the page
But now, there's a BUTTON in html(1)
<button (click)="refresh()" class="navbar-btn btn btn-success btn-md refresh">
<span class="glyphicon glyphicon-refresh"></span> Refresh
</button>
And there's a function in ts(1)
refresh()
{
console.log("this is topbar html and ts");
}
Next, there's a function in html(2)
I don't need to do anything here!
Also, there's a function in ts(2)
refreshEvent(){
console.log("i want use this function in html(1) BUT HOW??")
}
So, when I click the button, it should call refreshEvent()