-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HostListener is not firing at reset event #16847
Comments
Why do you expect |
At the description of the reset function at developer.mozilla.org:
I expected the reset event fired on each element of the parent form. If it is not what occur, how can I listen to the reset event on an input control? |
However this does not mean it has been "reset", just empty. |
Thanks! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a ... (check one with "x")
Current behavior
The @HostListener('reset') in the ngModel is not being fired when the reset event is occured.
Expected behavior
The @HostListener('reset') function must execute when the reset event fired.
Minimal reproduction of the problem with instructions
http://plnkr.co/edit/BYX8RsqUgY4FHvjhyN1X?p=preview
When you submit this, the right result is to reset the input element and clearing the success class, but it is not working. The @HostListener('reset') in the ngModel is not being fired.
The HostListener is at the bs-form-control.directive.ts file and the form/input is at the app.ts file.
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Windows, VSCode, angular-cli
Angular version: 4.1.2
Browser: [Firefox 53 | IE 11 ]
Language: [TypeScript 2.2 | ES5]
Node (for AoT issues):
node --version
= v7.7.4The text was updated successfully, but these errors were encountered: