简体   繁体   English

Angular如何侦听mousedown事件?

[英]How does Angular listen for mousedown events?

In the ngDraggable project , there is a line of code in the ngDrag directive ngDraggable项目中ngDrag指令中包含一行代码

element.on(_pressEvents, onpress);

where 哪里

var _pressEvents = 'touchstart mousedown';

But I looked all throughout the code, and I don't see any $emit or $broadcast of either _pressEvents , touchstart or mousedown . 但是我_pressEvents了整个代码,看不到_pressEventstouchstartmousedown任何$emit$broadcast

What's publishing these events? 这些事件是什么发布的? Is it something built into Angular? 它是Angular中内置的吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM