Ng2-Fun
Ng2-Fun

Reputation: 3393

What kind of mouse event does Angular2 support?

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

Answers (2)

shan kulkarni
shan kulkarni

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

G&#252;nter Z&#246;chbauer
G&#252;nter Z&#246;chbauer

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

Related Questions