How can I use JavaScript or Angular to count the number of characters entered in an input box when a key, like 'a', is pressed but not released on the keyboard?
<input type="text" name="charactercount" value="aaaaaa" /><br>
<span>6</span>
<input type="text" name="charactercount" value="aaaaaa" /><br>
<span>6</span>