Skip to content
Advertisement

how to bind on an event to get notified as the text is being entered

i am learning how to bind some events on input html tag. so as shown in the below posted html file, there is binding on the following states

JavaScript

when i run the App i enter text in the input filed but the following occures:

as i am enterting/typing text to input filed, non of onInputFieldChanged nor onInputFieldHasInput was called or executed. please let me know how to bind on an event on the input tag so that i get notified as there is a text being entered in the input filed. In otherwords, as i am typing text i want a corresponding function to be called with the text being entered is passed as an argument “event”

please let me know how to bind on an event so that i get notified as the text is being entered

html:

JavaScript

component:

JavaScript

Advertisement

Answer

use the input event to capture the change as shown here

component.html

JavaScript

component.ts

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement