Is it possible to activate a function when the user presses the / key in Angular directly from the keydown event?
<div (keydown.\)="alerting()"> </div>
<div (keydown.+)="alerting()"> </div>
Both of these work, but
<div (keydown./)="alerting()"> </div>
<div (keydown.Divide)="alerting()"> </div>
The first one generates an error, while the second one does not work
I am aware that I could use
<div (keydown)="alerting()"> </div>
And in the Angular module
alerting ( event: any ) {
if ( event.key === "/")
...
}
But is there a way to activate it directly from the template as shown in the first example?