Open Tomwash opened 6 years ago
Hey I came across a use case for HostListener that would be an awesome addition to this project.
Not sure if it already exists somewhere and i missed it though. but here's the following code i'm using.
`import {HostListener} from '@angular/core';` ` export class MyClass{ @HostListener('window:keyup', ['$event']) onKeyup(event: any) { if(event.key === 'Backspace'){ this.onKeyboardButtonClick('left'); } if(Number(event.key) >= 0 && Number(event.key) <=9){ this.onKeyboardButtonClick(event.key); } } } `
Hey I came across a use case for HostListener that would be an awesome addition to this project.
Not sure if it already exists somewhere and i missed it though. but here's the following code i'm using.