You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am fully aware of the fact I should be on Stackoverflow for questions, but this question is related to internal code rather than the usage of it, therefor I thought this would be a better place.
@willshowell Although PR #3082 demonstrates the usage of document.addListener('keydown').... I don't understand why that approach was preferred over HostListener. In the PR host is replaced with the verbose addListener approach, but HostListener would have got the job done in a cleaner fashion.
Both approaches work just fine, the one is just way more code than the other. And I'm curious based on what the decision was made :)
angular-automatic-lock-bot commented on Sep 7, 2019
Activity
willshowell commentedon Sep 27, 2017
Related #3082 and #6682
josephperrott commentedon Sep 27, 2017
Closing as the discussion and explanations are available in the prs linked above.
abdel-ships-it commentedon Sep 27, 2017
@willshowell Although PR #3082 demonstrates the usage of
document.addListener('keydown')....I don't understand why that approach was preferred overHostListener. In the PRhostis replaced with the verboseaddListenerapproach, butHostListenerwould have got the job done in a cleaner fashion.Both approaches work just fine, the one is just way more code than the other. And I'm curious based on what the decision was made :)
angular-automatic-lock-bot commentedon Sep 7, 2019
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.