Reputation: 3393
I have used click event in Angular2, and I am curious about what other mouse events it has, for example, mouseover? In addition, where can I find all the mouse event that Angular2 support? The official documentation seems unclear regarding event.
Upvotes: 15
Views: 28158
Reputation: 855
You can find some events here:
http://www.angulartypescript.com/angular-2-events/
example of mouseover in angular2
<div on-mouseover='over()' style="height:100px; width:100px; background:#e2e2e2">hello mouseover</div>
over(){
console.log("Mouseover called");
}
Upvotes: 0
Reputation: 657248
Angular2 supports all events the browser fires https://developer.mozilla.org/en-US/docs/Web/Events. If hammer.js is loaded additional gesture events are fired (like tap
). Other libraries and custom elements might fire even other events.
Upvotes: 18