angular.js listen for keypress as shortcut for button

前端 未结 5 846
离开以前
离开以前 2021-01-02 08:03

My first ever angular application is a pretty basic survey tool. I have multiple choice questions, with a button for each answer and a basic function that logs each answer o

5条回答
  •  迷失自我
    2021-01-02 08:36

    Take a look at the ngKeyup directive. Description of ngKeyUp

    Use an array of functions for the various functions you need based on the keypress

提交回复
热议问题