1
I’m trying to use the event focusin
in a Event Binding in Angular 4 and it does not return the expected for the event.
I added the event to a div
and to test just launched a console.log
(to see if it was activating) only that it does not return anything. When I change to event click
it returns the message in the console, but neither the onfocus
, nor the focusin
worked.
On the HTML page:
<div class="col-md-3 col-sm-3 border" (focusin)="painelAtivado()"><label class="subtitulos">Execução</label>
In the component.ts
:
painelAtivo(valor){
this.flag = valor;
}
Did Divs have that event?
– Marcelo Shiniti Uchimura
Note that the function has a different name:
painelAtivo
. Div does not receive Focus unless you addtabindex="0"
.– Sam