How to make form model update on blur in angular 2

前端 未结 2 454
别那么骄傲
别那么骄傲 2021-01-01 18:56

Is there an equivalent to this in angular 2?

ng-model-options=\"{ updateOn: \'blur\' }\"

Thanks

2条回答
  •  失恋的感觉
    2021-01-01 19:23

    In Angular 2 you can use the native DOM events

    
    

    Now, just define a method that does what you need when the field is blurred

提交回复
热议问题