The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Handle Events with Angular 2 Directives

Handle Events with Angular 2 Directives

1:35
A `@Directive` can also listen to events on their host element using `@HostListener`. This allows you to add behaviors that react to user input and update or modify properties on the element without having to create a custom component.
Watch this lesson now
Avatar
egghead.io

A @Directive can also listen to events on their host element using @HostListener. This allows you to add behaviors that react to user input and update or modify properties on the element without having to create a custom component.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?