Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Angular Quick Tip: Binding Specific Keys to the Keyup and Keydown Events

<input (keydown)="onKeydown($event)">
onKeydown(event) {
  if (event.key === "Enter") {
    console.log(event);
  }
}
 
PREVIOUS NEXT
Tagged: #Angular #Quick #Binding #Specific #Keys #Keyup #Keydown #Events
ADD COMMENT
Topic
Name
1+9 =