Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What kind of mouse event does Angular2 support?

Tags:

angular

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.

like image 278
Ng2-Fun Avatar asked Feb 17 '16 04:02

Ng2-Fun


People also ask

How does Angular handle click event?

To bind to an event you use the Angular event binding syntax. This syntax consists of a target event name within parentheses to the left of an equal sign, and a quoted template statement to the right. Create the following example; the target event name is click and the template statement is onSave() .

What does $event mean in Angular?

The $event object often contains information the method needs, such as a user's name or an image URL. The target event determines the shape of the $event object. If the target event is a native DOM element event, then $event is a DOM event object, with properties such as target and target. value .


1 Answers

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.

like image 129
Günter Zöchbauer Avatar answered Nov 08 '22 03:11

Günter Zöchbauer