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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unclear error message for hostbinding #39328

Closed
kingecg opened this issue Oct 19, 2020 · 2 comments
Closed

Unclear error message for hostbinding #39328

kingecg opened this issue Oct 19, 2020 · 2 comments

Comments

@kingecg
Copy link

kingecg commented Oct 19, 2020

馃悶 bug report

Affected Package

The issue is caused by package @angular/....

Is this a regression?

Yes, the previous version in which this bug was not present was: ....

Description

when create a directive or component, if you use arguments in hostlistener binding and declared wrong
number arguments in function like following code.

class XX {
@HostListener('click', ['$event.target'])
  onclick(){}
}

compiler report error:'Directive XX, Expected 0 arguments, but got 1' at the place which use the directive.
expect report error at directive code

馃敩 Minimal Reproduction

https://stackblitz.com/...

馃敟 Exception or Error





馃實 Your Environment

Angular Version:





Anything else relevant?

@JoostK
Copy link
Member

JoostK commented Oct 19, 2020

Closing as duplicate of #21329

@JoostK JoostK closed this as completed Oct 19, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants