Skip to content
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 prevents default when falsy value is returned #108

Closed
Hotell opened this issue Jun 24, 2016 · 0 comments
Closed

@HostListener prevents default when falsy value is returned #108

Hotell opened this issue Jun 24, 2016 · 0 comments

Comments

@Hotell
Copy link
Member

Hotell commented Jun 24, 2016

There was a misconception during implementation process. According to latest ng2 it should prevent default event, only if user returns explicitly false not just falsy value

If the decorated method returns false, then preventDefault is applied on the DOM event.

https://angular.io/docs/ts/latest/api/core/index/HostListener-var.html

@Hotell Hotell changed the title @HostBinding prevents default when falsy value is returned @HostListener prevents default when falsy value is returned Jun 24, 2016
Hotell added a commit that referenced this issue Jun 25, 2016
Hotell added a commit that referenced this issue Jun 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant