Closed ludohenin closed 9 years ago
I'm not quite sure what the real use of hostListeners though :) any idea ?
I used them before like this:
@Component({
selector: 'drag',
hostListeners: {
'mousedown': 'onMouseDown($event)'
}
})
but now I prefer:
<div class="item" (mousedown)="onMouseDown($event)">
so I'm not really sure what is the real purpose :-)
yeah OK, that's what I was thinking, thanks.
I think host listeners is provided as a high level api for the DOM, without touching the DOM. To better understand there was one example from victor savkin victorsavkin.com/post/118372404541/the-core-concepts-of-angular-2 , refer the heading hostelement
@ludohenin Thanks!