[英]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
了整个代码,看不到_pressEvents
, touchstart
或mousedown
任何$emit
或$broadcast
。
What's publishing these events? 这些事件是什么发布的? Is it something built into Angular? 它是Angular中内置的吗?
These are native events, they are triggered by the browser. 这些是本机事件,由浏览器触发。
Sources : 资料来源 :
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.