Clicking button on .ts file?


#1

is it possible click button on typescript?

home.html
<button [ngClass]="showingDetailEnd ? 'search_confirm': 'no_show_by_startclicked'" (click)="map.resetMarker()" ion-button>back to first.</button>

<map #map></map>

on map.ts
I have function resetMarker()

it works very well when clicking back to first button on home.html(call resetMarker function)
but I want to call it dynamically when modal is dismissed on home.ts.
I should call this function on home.ts.
How can I do this?


#2

@ViewChild(‘map’) map ;

this.map.resetMarker()

solved.