We have triggered keypress/down/up events programmatically easily with JavaScript/jQuery.
$(function() {
$('item').keydown();
$('item').keypress();
$('item').keyup();
$('item').blur();
});
But with Angular 5 and TypeScript, how can we do that?
//I am setting value programmatically -> working
document.getElementById('custom_Credit').setAttribute('value', coinsToBuy);
//setting focus -> working
document.getElementById('custom_Credit').focus();
//but there are no way to generate or trigger keypress/up events.
document.getElementById('custom_Credit')..........;