I need to change input value for custom value every time I am clicking out of the input. Here is code. I tried it with @ViewChild
, but it works only first time. If I paste something after the first click out of the component - value doesn't change when I clicked again out of the input. Why is this happening? Thanks
Asked
Active
Viewed 72 times
0

Vikas
- 11,859
- 7
- 45
- 69

mr__brainwash
- 1,334
- 3
- 16
- 40
1 Answers
0
You can use (focus) and (focusout) like this :
<input name="date" type="text" (focus)="focusFunc()" (focusout)="focusOutFunc()">

Mohammad Daliri
- 1,370
- 6
- 20
- 43
-
No, i have a bit complicated logic, it is just simple example. And there i need to handle click outside of the component, because component it is not only input. And btw, i think this wouldn't fix the problem that i described – mr__brainwash Mar 12 '18 at 21:07