angular.js - angular指令link事件绑定问题
仅有的幸福
仅有的幸福 2017-05-15 16:57:38
0
1
619

1、为什么设置阻止冒泡会报错


为什么加事件绑定时,设置第三个三个参数(false、true)会报错,不设置没问题

2、为什么绑定tap事件会触发两次


如果改为click就会正常

仅有的幸福
仅有的幸福

reply all(1)
PHPzhong

1 .on( events [, selector ] [, data ], handler )
on ​​method api, the last parameter represents the event callback
The method to prevent bubbling is
2 .on("tap",function(e){ e.stopPropagation();})
3 If you are not using IScroll, it is recommended to use click. If you are using ISroll, configure click:true

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template