-1
I’m trying to implement an event HostListener
to listen to a variable change.
I have an example that’s working, but you’re listening to the whole page and I just want to hear a little piece of code.
This is the part I want to hear:
<select class = "intenção-retângulo" (change) = "listQuantity = $ event.target.value">
<opção [ngValue] = "10" valor = "10"> 10 </ option>
<opção [ngValue] = "25" value = "25"> 25 </ option>
<opção [ngValue] = "50" value = "50"> 50 </ option>
<opção [ngValue] = "100" valor = "100"> 100 </ option>
</select>
This is my HostListener
current one that is working:
@HostListener('document:click', ['$event']) onNumEachPageChange($event) {
this.setArrayPages()
}
Thanks, helped
– Jonathan Benevides