Property 'value' does not exist on type EventTarget in TypeScript

后端 未结 8 1055
野趣味
野趣味 2020-11-29 17:06

So the following code is in Angular 4 and I can\'t figure out why it doesn\'t work the way as expected.

Here is a snippet of my handler:

onUpdatingSe         


        
8条回答
  •  执念已碎
    2020-11-29 17:56

    you can also create your own interface as well.

        export interface UserEvent {
          target: HTMLInputElement;
        }
    
           ...
    
        onUpdatingServerName(event: UserEvent) {
          .....
        }
    

提交回复
热议问题