I have a button, on the click of which I am opening a bootstrap modal pop-up. The modal pop-up contains some field with a submit button. I want to close the pop-up only when I a
I'm not sure what you really need to do but If you want to close modal with typescript you can just give an id to your html modal and call 'hide' method.
$('#newPostModal').modal('hide');
Sorry if this isn't what you want maybe if you can explain me better I can help you