# Angular: How do I register an event listener on document?

DevFeed: [Angular: How do I register an event listener on document?](<https://devfeed.tech/articles/angular-how-do-i-register-an-event-listener-on-document-21296.md>)

Original publisher: [Read original article](<https://juri.dev/blog/2016/09/ng2-event-registration-document/>)

Published: 2016-09-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Juri Strumpflohner](<https://devfeed.tech/sources/juri-strumpflohner.md>)

Topics: [Angular](<https://devfeed.tech/topics/angular.md>)

Tags: [angular](<https://devfeed.tech/tags/angular.md>), [component](<https://devfeed.tech/tags/component.md>)

## AI overview

An Angular tutorial explains how to register an event listener on the document without directly accessing the global object. It presents the component host property and the @HostListener decorator as alternatives.

## Source excerpt

Lorem ipsum dolor sit amet