Skip to content

Instantly share code, notes, and snippets.

@zimejin
Created June 6, 2019 11:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zimejin/e489d864e2c89c6595ffdfaef29eb190 to your computer and use it in GitHub Desktop.
Save zimejin/e489d864e2c89c6595ffdfaef29eb190 to your computer and use it in GitHub Desktop.
Angular 4 Event Binding
(focus)="myMethod()" // An element has received focus
(blur)="myMethod()" // An element has lost focus
(submit)="myMethod()" // A submit button has been pressed
(scroll)="myMethod()"
(cut)="myMethod()"
(copy)="myMethod()"
(paste)="myMethod()"
(keydown)="myMethod()"
(keypress)="myMethod()"
(keyup)="myMethod()"
(mouseenter)="myMethod()"
(mousedown)="myMethod()"
(mouseup)="myMethod()"
(click)="myMethod()"
(dblclick)="myMethod()"
(drag)="myMethod()"
(dragover)="myMethod()"
(drop)="myMethod()"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment