Home > Mobile >  Why won't (onChange) work for an <input>?
Why won't (onChange) work for an <input>?

Time:12-11

I have a primeng/html website that has a number of components - , , etc.

When I need to trigger a function in the angular ts page, I can do this by putting an (onChange) within the component.

This works for everything except an component.

This is all I'm trying to do...

<input [style]="{'width':'80px'}" pInputText type="number" min="0" max="999" (onChange)="myUpdateFunction($event)">

But it never gets into the myUpdateFunction.

Any suggestions?

Thanks much.

CodePudding user response:

Try this:

<input [style]="{'width':'80px'}" pInputText type="number" min="0" max="999" (change)="myUpdateFunction($event)">
  • Related