Skip to content
Advertisement

angular is not detecting change in input field

we are making an extension that scans the input field and fills some data into it. I am using the .value operator to fill the data. The problem is, it works in almost every case except the angular material input. I am able to set the value of the input, it displays in the field but somehow angular is unable to detect change.

Advertisement

Answer

try to dispatch an input event

target.dispatchEvent(new InputEvent('input', {bubbles: true}));
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement