Skip to content

HostListener doesn't work on structural directives (with global events) #14191

@lazarljubenovic

Description

@lazarljubenovic

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior
Placing a host listener on a structural directive doesn't work (no error, nothing).

Expected behavior
We should be able to use HostListener. Or it should throw a meaningful error if it's expected behavior.

Minimal reproduction of the problem

http://plnkr.co/edit/VOmMkLWSEVONy3cKXZJq?p=preview

Please tell us about your environment:

  • Angular version: 2.4.4
  • Browser: Chrome 54
  • Language: TypeScript

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions