1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Angular 2 Global Key detection

Discussão em 'Angular' iniciado por Emanuel Weinsjö, Junho 18, 2025.

  1. How can I bind a keyevent listener on the document instead of an specific inputfield in Angular 2 using RC5?

    For example:

    I Know this "bind it to an element"

    <input (keypress)="onKeyDown($event)" [(ngModel)]="something" type="text">


    How can I bind it to the document for example

    <div (keypress)="onKeyDown($event)"> <input /> ... </div>

    Continue reading...

Compartilhe esta Página