Angular 2 change event on every keypress

后端 未结 11 1407
说谎
说谎 2020-11-27 09:36

The change event is only called after the focus of the input has changed. How can I make it so that the event fires on every keypress?



        
11条回答
  •  無奈伤痛
    2020-11-27 09:54

    The secret event that keeps angular ngModel synchronous is the event call input. Hence the best answer to your question should be:

    
    {{mymodel}}
    

提交回复
热议问题