How to click on html button from the type script file in Angular 2 ? Some time we need to click into a button from the ts File to run one action, to do this you can try this solution (even if it is a hidden button) :
<button id="openModalButton" [hidden]="true" data-toggle="modal" data-target="#myModal">Open Modal</button>
On ts File use the code to “click” the button to open the modal :
This way can keep the bootstrap style of the modal and the fade in animation.